On Sun, Oct 30, 2011 at 06:54:51PM +0400, Lev Serebryakov wrote:
>   So, I have question: what should I do if I need to perofrm ONE
> action, which could block for some time (for example, open file or
> create ALQ)?
> 
>  I could create thread for this. But it looks strange and too heavy: create 
> thread
> to call one function once.
> 
>  Maybe, kernel has some API to postpone such task to one,
> always-running idle thread?
See taskqueue(9). On the other hand, waiting for the enqueued task to
finish is itself the sleepable action.

Attachment: pgpei4uyxuJ1X.pgp
Description: PGP signature



Reply via email to