chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Still having problems with threading


From: William Ramsay
Subject: [Chicken-users] Still having problems with threading
Date: Sun, 26 Apr 2009 10:54:50 -0400
User-agent: Thunderbird 2.0.0.17 (X11/20080914)

Hi again,

Well, I thought threading was working, but I'm only part of the way there.

Basically, what I want to do is interrupt the thread with a key stroke. While the thread is doing it's thing - let's say printing a count to standard out - I want to be able to hit a key and stop it. I guess the problem I'm having trouble understanding is how I switch between the primordial thread (t0) and the one I've started (t1). If t1 is in a loop that that checks if it should keep going (i.e. the count example in SRFI-18) how do I insert into that loop a check for what t0 is doing - or better, how do I allow t0 to do anything? It's one thing to say add to counterA and then add to counterB, one of which is in thread 0 and the other of which is in t1. It's another thing to pick up an interrupt (i.e. a key stroke) that may come at any time.

I may be in over my head, but isn't this sort of thing done all the time?

Bill




reply via email to

[Prev in Thread] Current Thread [Next in Thread]