Re: In-kernel API for tasks, which could wait?

From: Kostik Belousov <kostikbel_at_gmail.com>
Date: Sun, 30 Oct 2011 17:03:39 +0200
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.

Received on Sun Oct 30 2011 - 14:03:44 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:19 UTC