Re: In-kernel API for tasks, which could wait?
--6B4omjoolujX8zOn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
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)?
>=20
> I could create thread for this. But it looks strange and too heavy: crea=
te thread
> to call one function once.
>=20
> 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.
--6B4omjoolujX8zOn
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (FreeBSD)
iEYEARECAAYFAk6tZ0sACgkQC3+MBN1Mb4guAgCfcYfAru4Fg3QD3rJ4Ww0Zo+Dn
RS0AoNfmqRCpOFfzLfD4lfF4c2dftR3x
=oMrN
-----END PGP SIGNATURE-----
--6B4omjoolujX8zOn--
討論串 (同標題文章)
完整討論串 (本文為第 3 之 3 篇):