guile-devel
[Top][All Lists]
Advanced

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

Re: Threads and asyncs


From: Tom Lord
Subject: Re: Threads and asyncs
Date: Mon, 2 Sep 2002 15:24:34 -0700 (PDT)

        > I don't think they are simpler or faster.

Plausibly thread-independent asyncs are faster, at least by a few
instructions, since global data is less expensive to access than
thread-specific data.  Against that, I suppose, are locking issues.

My concern is not only how it works out in the current implementation,
as an incremental change -- but also how it works out as a candidate
feature of an implementation independent Scheme API.   While the
performance loss may be negligable in Guile, it might not be in other
plausible implementations.

There's always wiggle room.  Nobody has said that it's Guile's job to
solve the Scheme API problem.  You can (and have) just declare "that
doesn't matter for Guile's aims" and then there is no basis for
disagreement.


        > Is there no use for thread-independent system-asyncs?

        I can't think of any, right now.  

Any short computation that needs to be invoked asynchronously (say,
perhaps, driven by a timer) is a candidate.  One can imagine efficient
I/O working this way, for example; or simple animation of some sort in
a GUI.

Suppose we have a multi-CPU system and an application with roughly one
thread per CPU -- being able to schedule tasks that float to the next
available CPU seems obviously useful, to me.

-t




reply via email to

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