Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Chicken McNuggets <chicken@mcnuggets.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Asynchronous programming using standard C |
| Date | 2012-09-03 11:43 +0100 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <k221kk$6k8$1@speranza.aioe.org> (permalink) |
| References | <k20mi4$eg7$1@speranza.aioe.org> <pan.2012.09.03.02.10.03.657000@nowhere.com> |
On 03/09/2012 03:09, Nobody wrote: > On Sun, 02 Sep 2012 23:28:18 +0100, Chicken McNuggets wrote: > >> I assume that asynchronous programming is generally done by calling a >> function (which includes a call back function pointer in its arguments) >> which starts a thread and then immediately returns. Once the thread has >> completed the task it then calls the call back function to return the >> data to the caller. >> >> Is this the basic idea of asynchronous programming or have I got it >> completely wrong? > > That is one specific example of an asynchronous system. > > Other examples might have the thread invoke the callback whenever > something interesting happens, not just on completion, or might avoid the > callback and have the initiator poll for updates. Or there may not be a > separate thread, just an event-processing loop which invokes callbacks as > events arrive (the callbacks are synchronous with respect to the > event-dispatching function but asynchronous with respect to the code which > installed them or which triggered the event). > > "Asynchronous" generally just means that code is structured to accept > information as it becomes available rather than blocking until the > information is provided. > Ah. Thanks for your response. That makes sense.
Back to comp.lang.c | Previous | Next — Previous in thread | Find similar | Unroll thread
Asynchronous programming using standard C Chicken McNuggets <chicken@mcnuggets.com> - 2012-09-02 23:28 +0100
Re: Asynchronous programming using standard C Nobody <nobody@nowhere.com> - 2012-09-03 03:09 +0100
Re: Asynchronous programming using standard C Chicken McNuggets <chicken@mcnuggets.com> - 2012-09-03 11:43 +0100
csiph-web