Bugs item #1895443, was opened at 2008-02-17 09:36
Message generated for change (Comment added) made by sborho
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=968354&aid=1895443&group_id=199155

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: overlay icons
Group: None
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Adrian Buehlmann (adrianbuehlm)
Assigned to: Nobody/Anonymous (nobody)
Summary: Overlay: ThreadingModel registry setting

Initial Comment:
This is not actually an identified bug, but:

It worries me a little bit that TortoiseHg sets the "ThreadingModel"="Both" in 
the registry for it's overlay handler COM component. "Both" implies that the 
component can handle free threaded calls (thus will synchronize calls by 
itself).

I haven't connected any current problem to this, but I would suggest to use 
"ThreadingModel"="Apartment" which tells callers that free thread calls are not 
allowed, which seems safer to me, given that it appears to me that the 
TortoiseHg overlay handler code doesn't have any thread synchonisation. As I 
understand it, COM will synchronize the calls with this setting.

I haven't identified explorer.exe to use multiple threads when calling the 
overlay. But might be good to stay on the save side with regards to the cache 
in iconoverlay.py.

The attached patch would ensure that "ThreadingModel"="Apartment" in the 
registry.

----------------------------------------------------------------------

>Comment By: Steve Borho (sborho)
Date: 2009-03-05 01:05

Message:
moved to bb, wish I knew this earlier. I think it explains the vista
behavior

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2008-05-26 06:35

Message:
Logged In: NO 

http://support.microsoft.com/kb/287087 describes calling shell functions.
For the overlay handler, it's the other direction: the shell
(explorer.exe) calls the
thg COM servers (i.e. the thg COM objects).


----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2008-05-26 05:47

Message:
Logged In: NO 

More info on this can be found here:
http://support.microsoft.com/kb/287087


----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2008-04-05 05:41

Message:
Logged In: NO 

Patch pushed to crew.

----------------------------------------------------------------------

Comment By: Adrian Buehlmann (adrianbuehlm)
Date: 2008-02-27 09:52

Message:
Logged In: YES 
user_id=1456720
Originator: YES

I have that info from the book "Inside COM" by Dale Rogerson. One of the
best books on COM I've ever seen. Unfortunately, it's no longer available.
I had to buy a used one myself -- really amazing, first time in my life I
bought a used software book....

There is another book from Don Box still available "Essential COM", but
Rogerson is better.

I can just propose to google for "ThreadingModel", which brings up
http://msdn2.microsoft.com/en-us/library/ms693779(VS.85).aspx for example.
I haven't read that though.

----------------------------------------------------------------------

Comment By: TK Soh (tksoh)
Date: 2008-02-27 09:29

Message:
Logged In: YES 
user_id=411637
Originator: NO

Just to help me understand this issue better, do you have any references
(on the web) on this topic?

----------------------------------------------------------------------

Comment By: Adrian Buehlmann (adrianbuehlm)
Date: 2008-02-17 09:39

Message:
Logged In: YES 
user_id=1456720
Originator: YES

I'm attaching the file "registry.txt" showing the registry keys as set
with the patch applied.
File Added: registry.txt

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=968354&aid=1895443&group_id=199155

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to