[plt-scheme] threads

From: Corey Sweeney (corey.sweeney at gmail.com)
Date: Sun Apr 30 16:02:44 EDT 2006

The built in user manual says the following:

==========================================
MzScheme supports multiple threads of control within a program. Threads are
implemented for all operating systems, even when the operating system does
not provide primitive thread support.

(thread thunk) invokes the procedure thunk with no arguments in a new thread
of control. The thread procedure returns immediately with a thread
descriptor value. When the invocation of thunk returns, the thread created
to invoke thunk terminates.

Example:

(thread (lambda () (sleep 2) (display 7) (newline))) ; => a thread
descriptor
 displays 7 after two seconds pass
==========================================


> (thread (lambda () (sleep 2) (display 7) (newline)))
#<thread:932:10>
hash-table-get: expects type <hash-table> as 1st argument, given: #f; other
arguments were: profile-point20003


i then tried doing it in a "clean" environment, (i.e. a environment in which
none of my programs had been run) and it worked fine.  Wthat could I be
doing that could be causing this?

The following are things that I could imagine might be related:

* My program uses a GUI (and therefore threads are already happening)
* My version is a bit old:
     Welcome to DrScheme, version 299.406-svn25nov2005.
* I have profiling switched on:
     Language: Pretty Big (includes MrEd and Advanced Student) custom...


***Ok, I just tried it with profiling turned off, and things worked fine.
Is there a conflict between profiling and threads?

Corey

--
((lambda (y) (y y)) (lambda (y) (y y)))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20060430/75dd8bfe/attachment.html>

Posted on the users mailing list.