William ML Leslie writes:
> On 6 December 2015 at 01:58, Christopher Allan Webber
> wrote:
>> Amirouche Boubekki writes:
>>> 8sync has two types of async-request:
>>>
>>> ** run-requests, which implements kind of a *coroutine* behavior.
>>>
>>> It pause the execution of the current procedure and
On 6 December 2015 at 01:58, Christopher Allan Webber
wrote:
> Amirouche Boubekki writes:
>> 8sync has two types of async-request:
>>
>> ** run-requests, which implements kind of a *coroutine* behavior.
>>
>> It pause the execution of the current procedure and schedule
>> the provided lambda to be
Le 2015-12-05 15:58, Christopher Allan Webber a écrit :
Amirouche Boubekki writes:
* Agenda
** The canonical callback based event loop API is not visible enough
It should be obvious coming from outside Guile world what/where
is the event loop. As such, agenda doesn't seem like a good name.
Le 2015-12-05 15:58, Christopher Allan Webber a écrit :
Amirouche Boubekki writes:
*** `tdelta` is not useful.
tdelta is used so the the agenda knows to put it a future time from the
current execution of the agenda.
I wanted to write that it's only a shorcut:
```
(define tdelta make-time-
Le 2015-12-05 15:58, Christopher Allan Webber a écrit :
Amirouche Boubekki writes:
* %8sync
This is the main macro, here is it's definition:
```
(define-syntax-rule (%8sync async-request)
(propagate-%async-exceptions
(abort-to-prompt (current-agenda-prompt) async-request)))
```
I'm wo
Amirouche Boubekki writes:
>> Le 2015-12-04 03:47, Amirouche Boubekki a écrit :
>>
>>>Le 2015-12-04 03:15, Amirouche Boubekki a écrit :
>>>
>>>```
>>>(define (read/ sock)
>>> (abort-to-prompt 'loop (lambda (cc)
>>> (loop-add-reader s
Le 2015-12-04 03:47, Amirouche Boubekki a écrit :
Le 2015-12-04 03:15, Amirouche Boubekki a écrit :
```
(define (read/ sock)
(abort-to-prompt 'loop (lambda (cc)
(loop-add-reader sock (lambda () (cc
(read
sock)))
```
Le 2015-12-04 03:15, Amirouche Boubekki a écrit :
```
(define (read/ sock)
(abort-to-prompt 'loop (lambda (cc)
(loop-add-reader sock (lambda () (cc (read
sock)))
```
This is mistake, it should be a macro, so that, I think, even if the
callstack displays the `l
Héllo,
I've done some exploration regarding this topic; I think it might of
interest or it's very naive.
It goes like this:
``` scheme
(define (loop-run-forever)
(while #true
(call-with-prompt 'loop
loop-run-once
(lambda (cc callback) (callback cc)
```
`loop-run-once
Ludovic Courtès writes:
> Christopher Allan Webber skribis:
>
>> Christopher Allan Webber writes:
>>
>>> ... and the complicated-number-code will launch asynchronously, but wake
>>> back up the appropriate function appropriately. You can also set timed
>>> events, read and write to ports asynchr
Christopher Allan Webber skribis:
> It makes significant use of delimited continuations. You can do things
> like this:
>
> (define (my-number-talker)
> (format #t
> "Oh boy, looks like we got back ~a!\n"
> (%sync (%run (+ 1 2 3 (complicated-number-code 38))
>
> ... and the
Christopher Allan Webber skribis:
> Christopher Allan Webber writes:
>
>> ... and the complicated-number-code will launch asynchronously, but wake
>> back up the appropriate function appropriately. You can also set timed
>> events, read and write to ports asynchronously, and etc. It has a nice
Christopher Allan Webber writes:
> ... and the complicated-number-code will launch asynchronously, but wake
> back up the appropriate function appropriately. You can also set timed
> events, read and write to ports asynchronously, and etc. It has a nice
> non-blocking loop, and personally I've f
Hello all,
Some of you may remember the thread on this list about Guile needing an
asynchronous programming library, with a writeup from a conversation
David Thompson, Mark Weaver, guest star Andrew Engelbrecht, and I had at
LibrePlanet:
https://lists.gnu.org/archive/html/guile-devel/2015-10/ms
14 matches
Mail list logo