Table of Contents


qt_begin_blocking_action, qt_end_blocking_action - indicate blocking operations to the runtime


#include <qthread/io.h>




These two functions are used to isolate sections of code that may block (and that are not intercepted in some other way). It is useful for inter-operating with third-party libraries.

What happens is that the task that calls qt_begin_blocking_action() is descheduled and enqueued in the system call queue. It is treated the same as anything else in that queue with regard to the number of concurrent operations permitted and the relationship to the servicing threads. The task, after calling qt_begin_blocking_action(), will wake up in an external, dedicated thread and can perform the blocking operation without fear that doing so would hijack the original worker thread. Once the blocking operation is complete, the task must call qt_end_blocking_action(), which will reschedule the task in the standard scheduling queues.

See Also

qt_accept(3) , qt_connect(3) , qt_poll(3) , qt_pread(3) , qt_pwrite(3) , qt_read(3) , qt_select(3) , qt_system(3) , qt_wait4(3) , qt_write(3)

Table of Contents