[Kolab-devel] pykolab/format
Jeroen van Meeuwen (Kolab Systems)
vanmeeuwen at kolabsys.com
Fri Feb 24 13:12:31 CET 2012
On 2012-02-24 10:58, Jeroen van Meeuwen (Kolab Systems) wrote:
> On 2012-02-24 8:55, Christian Mollekopf wrote:
>> pykolab/format/tests/test-thread_safety.py | 68
>> +++++++++--------------------
>> 1 file changed, 22 insertions(+), 46 deletions(-)
>>
>> New commits:
>> commit cb63be089fce18dd9899526455022dad10f8e2ac
>> Author: Christian Mollekopf <mollekopf at kolabsys.com>
>> Date: Fri Feb 24 09:54:15 2012 +0100
>>
>> Actually call the function from different threads instead of the
>> main thread.
>>
>
> Hi Christian,
>
> I'm reverting this change, renaming the resulting test (the
> original),
> and applying your version of the test as the test for thread safety.
>
Let me rephrase, because maybe I'm not going to do any of that... Not
Sure Yet(TM)
If I understand correctly, getSerializedUID() is called from within the
child thread, even though the reason for it to be called is coming from
the main thread's <thread>.uid() call. It seems though the most
upper-level thread causing the function to be called is the thread under
which it runs - and thus getSerializedUID() returns that thread local
value?
Now, I've attached a parallel_threads test, which succeeds, but does a
full mesh of comparisons. Note I do not have to time.sleep() - but I
added some tests that sleep anyway.
Could you please examine the output (including what I am assuming are
the thread identifiers spit out to stdout/stderr by libkolabxml), and
confirm/deny whether or not these tests are appropriate / do what we
expect them to do?
Kind regards,
Jeroen van Meeuwen
--
Systems Architect, Kolab Systems AG
e: vanmeeuwen at kolabsys.com
m: +44 74 2516 3817
w: http://www.kolabsys.com
pgp: 9342 BF08
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-parallel_threads.py
Type: text/x-java
Size: 7660 bytes
Desc: not available
URL: <http://lists.kolab.org/pipermail/devel/attachments/20120224/ca5821c0/attachment.bin>
More information about the devel
mailing list