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.
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:19 UTC