On Wed, Feb 18, 2004 at 10:22:13PM -0500, Tim Peters wrote:
| [Matt Feifarek, w/ some ugly thread symptoms seen only on Windows]
| 
| Matt, what does this print for you if you run it on your Linux box?
| 
| """
| import thread, time
| 
| def worker():
|     print thread.get_ident()
| 
| for i in range(10):
|     thread.start_new_thread(worker, ())
|     time.sleep(1)
| """

On linux:
1026
2050
3074
4098
5122
6146
7170
8194
9218
10242

On Winders: (don't know why I'm getting doubles)
(Note, this windows box is python 2.2.1 not 2.3.2... but I'm away from
that box today)

1716
1716
1780
1780
684
684
1120
1120
964
964
848
848
1364
1364
576
576
376
376
764
764

| If you let a thread die with changes in progress (neither commit nor abort on its 
then-current transaction), it looks all but certain to me that ZODB's tid->transaction 
dict will get confused by the next thread Windows creates (which is all but certain to 
have the same tid as the thread that just died).

So is it "best practice" to do abort() even if no changes are made? Is
there even a transaction if no changes are made?

Thanks.

I'll followup on the other windows box later today.


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to