[Ecls-list] separate environments for threads

Dustin Long dlong at stevens.edu
Tue Jun 26 04:45:37 UTC 2007


Ah, I see how it works now. Well, unfortunately that means I'll need a 
new approach. Thanks for the info!

Dustin

Dean O'Connor wrote:
> Dustin,
>
> I get the same thing on XP aswell with latest CVS build.
>
> I think you're answer may lie in these responses (attached) from 
> Juanjo (from the archive).
>
> cheers
> deano
>
> Dustin Long wrote:
>> Has anyone ever used ECL threads much, to the extent that they could 
>> see separate environments for each thread? I'm running this code sample:
>>
>> (defun demo-envs ()
>>   (let (p q)
>>     (setf p (mp:make-process))
>>     (setf q (mp:make-process))
>>     (mp:process-preset p
>>                        (lambda ()
>>                          (eval '(progn (defvar x 1)
>>                                        (dotimes (i 1000)
>>                                          (format t "A ~s ~s~%" x i))))))
>>     (mp:process-preset q
>>                        (lambda ()
>>                          (eval '(progn (defvar x 2)
>>                                        (dotimes (i 1000)
>>                                          (format t "B ~s ~s~%" x i))))))
>>     (mp:process-enable p)
>>     (mp:process-enable q)))
>>
>> And I thought that it should yield a series of "A 1 ..." and "B 2 
>> ..." printouts, but instead I'm seeing "A 1 ..." and "B 1 ...". I was 
>> under the impression that x should be distinct in p and q because it 
>> is defined in that thread's environment, but it looks like it's being 
>> defined globally instead. What am I doing wrong here? Problem appears 
>> in both WinXP and Ubuntu.
>>
>> Dustin
>>
>> ------------------------------------------------------------------------- 
>>
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> _______________________________________________
>> Ecls-list mailing list
>> Ecls-list at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/ecls-list
>>   
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Ecls-list mailing list
> Ecls-list at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ecls-list
>   





More information about the ecl-devel mailing list