[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [TSVN] status cache, mutexes

From: SteveKing <steveking_at_gmx.ch>
Date: 2005-01-06 19:58:39 CET

SteveKing wrote:

> 1. critical sections aren't good enough to guard the cache. The reason
> for that is that the cache is global in the COM dll and therefore used
> by all processes concurrently. A mutex is needed to guard it.
> You can easily try this out yourself: create a simple dll which only
> shows a messagebox telling you the address of a dll global string. Then
> create a simple exe which does nothing more than load this dll (make
> sure it doesn't exit immediately so the dll stays loaded). Then start
> the exe several times - each time you start the exe another process is
> started and the dll is loaded into process space. But the dll tells you
> the same address of the global string, no matter which process it has
> been loaded from.
> Since I've experienced crashs when just using critical sections I
> started to wonder and used mutexes for some time now. But to be sure I
> just wrote such a test dll and exe.

Hmmm - I've extended the test a little. Now it seems that the dll has
different global variables for each process as I would expect. I'll do
some more tests and report back...

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Thu Jan 6 19:59:35 2005

This is an archived mail posted to the TortoiseSVN Dev mailing list.