From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Structure of the multitasking server Date: Fri, 13 Mar 2015 18:04:42 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <8b4d1170-22e6-40d3-8ed1-096dc0163491@m36g2000hse.googlegroups.com> <71b51c8e-6bed-4156-9f52-31bef57b8575@googlegroups.com> <871tktuc9i.fsf@adaheads.sparre-andersen.dk> NNTP-Posting-Host: rrsoftware.com X-Trace: loke.gir.dk 1426287883 4386 24.196.82.226 (13 Mar 2015 23:04:43 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 13 Mar 2015 23:04:43 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:25171 Date: 2015-03-13T18:04:42-05:00 List-Id: wrote in message news:c943b1fd-8c0c-4c22-ba8c-fb72fbd52805@googlegroups.com... Le vendredi 13 mars 2015 09:14:52 UTC+1, Dmitry A. Kazakov a écrit : >> You could add a wakeup event to prevent busy waiting. An alternative >> would >> be a waitable jobs queue. >Wouldn't a delay instruction help ? Of course. A "slow busy wait" is good enough in almost all circumstances (typically, the machine isn't doing anything important anyway during that the minimal time used). It certainly beats distorting one's design. Of course, if there is a queue of jobs anyway, it makes sense to arrange that to be blocking so you end up waiting on that. But then of course you need a "stop" job else the supervisor ends up waiting forever. Randy.