mit-scheme-devel
[Top][All Lists]
Advanced

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

Re: [MIT-Scheme-devel] Threads in MIT Scheme


From: Matt Birkholz
Subject: Re: [MIT-Scheme-devel] Threads in MIT Scheme
Date: Mon, 29 Apr 2019 16:43:49 -0700
User-agent: Evolution 3.30.1-1build1

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On Sun, 2019-04-28 at 21:08 +0000, Aaron Blake Mitchell wrote:
> [...]
> To be more specific:
> 
> (define (thunk x) (lambda () x))
> 
> In Racket:
> 
> (thread (thunk (begin (sleep 2000) (display 2))))
> 
> returns immediately with a thread object, and then 2 seconds later
> displays 2 to the console.

In Scheme the begin expression is evaluated and the thunk procedure
applied to its value.

> [...]
> Also, there are quite a few functions in the thread.scm that don't
> seem to be available in Scheme. Some of them work and some are
> undefined in a Scheme REPL. For example, create-thread, current-
> thread, threads-list all work, but run-thread and some others aren't
> defined.

The procedures not defined in the REPL are not exported to the global
package () and are internals with which you probably shouldn't mess.

-----BEGIN PGP SIGNATURE-----

iQGzBAEBCgAdFiEELKqfot8xyi0bi8Ssp/sTamsYs6IFAlzHjDUACgkQp/sTamsY
s6Inigv+KItVNM6WgmkhwfB/db4B7g0XlLxAOLoI2PUaR3h7zHB1RPT1aTA4zHJ+
2sJDYeHJAyPV3+jnH9dUnKBRF8DR8rdnnLLodl6gL1uBtN2jEw4qmaNaJfArEN7X
mZDj6BvO3F3TSTZ/BluxA3m0PRShz2m0mzpc81pzJe32/O2kzEPhkAFnha6EdNBg
q0+bIUHXzubo4c4XcF8vwzsSqJdZaRI8m8/bG2YoWpZN+tW0KODgyBQkeDBYCf4V
LB+hsEDGbBzi7FPCIMHbTM3xQOqZFy3hGlGt0OdGbQPEtgVO+ziikIOM+lbUZrdz
GArs/90tHzlf2kOwb3t3BjTQMr+qOkuYz/4zqqU/KNq1ukklxN5bVk4fdfsPPk6R
OBm5ayYPBywwJD6gJ5UTkhm1GQo/2h44c1QY9mzeeaeCqLnMX/kCx2vbBQZ5g6DI
qloDTKJBzHctDmEPGDxnjbTilA1XOrwhfFd/l2V1V8/mdmKM76Nfet9Rbu2aZKYm
OfzolC5L
=+lpi
-----END PGP SIGNATURE-----




reply via email to

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