[gambit-list] multithreaded debugging fun

lowly coder lowlycoder at huoyanjinjing.com
Wed May 20 00:03:30 EDT 2009


Please see typescript (sorry, copy/paste not working in X right now)

i have test.scm, which forks off a thread (<thread #2>) which forever does:
  (pp 'yay); so I can see it print
  (+ "asdf" 1) ; just to generate an error

I'm running gsc with -:dar, so i want debugging support, for all threads,
and get thrown into a REPL when an error occurs.

Here are my questions:

1) in my primordial thread, why do I have to execute some command (like
"(void)") before I get thrown into the REPL in thread2? if everything is
running concurrently, why does the error in thread2 not pop up immediately
and get me thrown into a REPL?

2) in thread 2, after hitting ,(c 0) ... why don' i immediately get an
"yay"? (if it's continuing from that error, it should jump back to the (pp
'yay))

3) after printing said 'yay', why do I have to hit (void) in the thread #1
before getting the error repl in thread 2? why doesn't the error immediately
happen

4) it seems like i'm ping-ponging between the two threads on the REPL. Is
there anyway I can control this myself? (i.e. some command to jump me to
thread1, some to jump me to thread2?)

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20090519/2239fe06/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: typescript
Type: application/octet-stream
Size: 1491 bytes
Desc: not available
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20090519/2239fe06/attachment.obj>


More information about the Gambit-list mailing list