Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #14404

Re: Non-blocking asynchronous execution

From Arnold Doray <invalid@invalid.com>
Newsgroups comp.lang.forth
Subject Re: Non-blocking asynchronous execution
Date 2012-07-26 03:03 +0000
Organization A noiseless patient Spider
Message-ID <juqc18$tkd$4@dont-email.me> (permalink)
References <jup4k8$u1a$1@dont-email.me> <7cb18bba-fb1b-4e2b-bc0b-74e56bae0d91@googlegroups.com> <7xwr1rs75s.fsf@ruckus.brouhaha.com> <be624740-cf2b-467c-a3bd-31dc62117afa@googlegroups.com>

Show all headers | View raw


On Wed, 25 Jul 2012 18:22:42 -0700, krishna.myneni wrote:

> Is there some disadvantage of a user-level queue, e.g.
> 
> ' word1 1000 set-timeout
> ' word2 2000 set-timeout
> \ ...
> start-timeout
> 
> where SET-TIMEOUT adds the entries in a table, and START-TIMEOUT kicks
> off the setup of the SIGALRM handler and the timer for the first xt in
> the table. The handler, which in my example was the word DELAYED-WORD
> would then execute the first xt, lookup the next entry in the table and
> set its xt and reset the timer signal to the difference in times between
> that entry and its previous one. Seems pretty easy and flexible to
> handle at the user level.
> 
> Krishna

Firstly, I feel that using START-TIMEOUT at the end to kick off the 
scheduling greatly removes the advantage of this style of programming. 
For one, it would not be possible to add scheduled tasks dynamically. 

Second, your solution would fail if a task in the queue blocks because it 
is waiting on I/O. But overcoming this problem is precisely the point of 
this style of programming. 

Cheers,
Arnold

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Non-blocking asynchronous execution Arnold Doray <invalid@invalid.com> - 2012-07-25 15:50 +0000
  Re: Non-blocking asynchronous execution Mark Wills <markrobertwills@yahoo.co.uk> - 2012-07-25 09:09 -0700
    Re: Non-blocking asynchronous execution Arnold Doray <invalid@invalid.com> - 2012-07-26 02:48 +0000
  Re: Non-blocking asynchronous execution rickman <gnuarm@gmail.com> - 2012-07-25 14:41 -0700
    Re: Non-blocking asynchronous execution Arnold Doray <invalid@invalid.com> - 2012-07-26 02:54 +0000
      Re: Non-blocking asynchronous execution Paul Rubin <no.email@nospam.invalid> - 2012-07-25 20:48 -0700
  Re: Non-blocking asynchronous execution krishna.myneni@ccreweb.org - 2012-07-25 16:57 -0700
    Re: Non-blocking asynchronous execution Paul Rubin <no.email@nospam.invalid> - 2012-07-25 17:22 -0700
      Re: Non-blocking asynchronous execution krishna.myneni@ccreweb.org - 2012-07-25 18:22 -0700
        Re: Non-blocking asynchronous execution Arnold Doray <invalid@invalid.com> - 2012-07-26 03:03 +0000
          Re: Non-blocking asynchronous execution krishna.myneni@ccreweb.org - 2012-07-26 00:59 -0700
            Re: Non-blocking asynchronous execution Arnold Doray <invalid@invalid.com> - 2012-07-26 08:27 +0000
              Re: Non-blocking asynchronous execution krishna.myneni@ccreweb.org - 2012-07-26 11:02 -0700
                Re: Non-blocking asynchronous execution Arnold Doray <invalid@invalid.com> - 2012-07-27 05:09 +0000
        Re: Non-blocking asynchronous execution Paul Rubin <no.email@nospam.invalid> - 2012-07-27 00:03 -0700
          Re: Non-blocking asynchronous execution Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-07-27 11:55 +0000
  Re: Non-blocking asynchronous execution Paul Rubin <no.email@nospam.invalid> - 2012-07-25 17:48 -0700
    Re: Non-blocking asynchronous execution Arnold Doray <invalid@invalid.com> - 2012-07-26 02:44 +0000
      Re: Non-blocking asynchronous execution "Elizabeth D. Rather" <erather@forth.com> - 2012-07-25 17:26 -1000
        Re: Non-blocking asynchronous execution Arnold Doray <invalid@invalid.com> - 2012-07-27 05:23 +0000
          Re: Non-blocking asynchronous execution Paul Rubin <no.email@nospam.invalid> - 2012-07-26 23:24 -0700
      Re: Non-blocking asynchronous execution Paul Rubin <no.email@nospam.invalid> - 2012-07-25 20:56 -0700
        Re: Non-blocking asynchronous execution Arnold Doray <invalid@invalid.com> - 2012-07-26 08:21 +0000
          Re: Non-blocking asynchronous execution Paul Rubin <no.email@nospam.invalid> - 2012-07-26 13:43 -0700
            Re: Non-blocking asynchronous execution Arnold Doray <invalid@invalid.com> - 2012-07-27 04:40 +0000
              Re: Non-blocking asynchronous execution Paul Rubin <no.email@nospam.invalid> - 2012-07-26 23:10 -0700
  Re: Non-blocking asynchronous execution jim@rainbarrel.com - 2012-07-27 10:41 -0700

csiph-web