Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Oct 2011 17:03:39 +0200
From:      Kostik Belousov <kostikbel@gmail.com>
To:        Lev Serebryakov <lev@freebsd.org>
Cc:        hackers@freebsd.org, current@freebsd.org
Subject:   Re: In-kernel API for tasks, which could wait?
Message-ID:  <20111030150339.GP50300@deviant.kiev.zoral.com.ua>
In-Reply-To: <43470728.20111030185451@serebryakov.spb.ru>
References:  <43470728.20111030185451@serebryakov.spb.ru>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111030150339.GP50300>