Hello

I have a problem with table reflection under multi-thread without lock.
It works fine under single-thread or multi thread with lock protection.

I got following result by the attached test script:
single-thread or multi thread with lock protection:  
    It prints some logs of create connection, query metadata etc, and then 
the table reflection returned.
multi-thread without lock protection:
    table reflection returned before create connection and query metadata, 
without any exceptions, loggings, but got empty columns list
    and after about 20ms(metadata of this table fetched), all threads works 
fine(got correct columns list)


I did found any related documentation about this, so I want to know:
Is it a bug?
Or the reflection isn't thread-safe, if so, is it thread-safe for 
reflection different tables?(see following code for example)
with tbl1_lock:
  Table("table1", ... )

with tbl2_lock:
  Table("table2", ...)


Thanks in advance


-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to