Subject | Re: [firebird-support] Firebird 25 thread safety |
---|---|
Author | Michael Ludwig |
Post date | 2011-01-24T01:02:50Z |
ma_golyo schrieb am 21.01.2011 um 13:54 (-0000):
style to give a reference when quoting.
developers don't have to care, the burden is taken away from them.
for query X. At some random point in the middle of a transaction, let's
say thread A has fetched the first 20 out of perhaps 123 records, the
OS passes control to thread B. Well, thread B also has a reference to
the connection but is totally unaware of the work performed on that
connection by thread A. So when thread B merrily calls prepare() or
what not on the connection, it'll trigger an exception.
--
Michael Ludwig
>I could certainly google that sentence, but I'll just note it's good
> From the documentation : "The client libraries, including the embedded
> one, can now be used in multi-threaded applications without any
> application-level synchronization."
style to give a reference when quoting.
> What does this exactly mean?Seems to mean that concurrency is handled at the library. The app
developers don't have to care, the burden is taken away from them.
> #1 : Can I use only a single connection accessing by multipleThat won't work. Think about it. There's a connection used by thread A
> transactions from different threads at the same time?
for query X. At some random point in the middle of a transaction, let's
say thread A has fetched the first 20 out of perhaps 123 records, the
OS passes control to thread B. Well, thread B also has a reference to
the connection but is totally unaware of the work performed on that
connection by thread A. So when thread B merrily calls prepare() or
what not on the connection, it'll trigger an exception.
> #2 : Can I use only a single transaction accessing by multipleI think this is about the same as #1.
> "querys" from different threads at the same time?
--
Michael Ludwig