I
iason demiros
Hi everybody,
if you could please advice:
In a web-based app multiple users can query a VC DLL. The function
that is called is a Search(char *string) function. The latter is
exported by a DLL that fetches information from a hash database, gdbm.
When using MonitorEnter, MonitorExit on JNI side it has very low
performance but works. Else, it mixes results from different users, in
a non-consistent manner. This is natural since the DLL is not
multithreaded. The question is: Should I create a separate thread at
the level of the Search() function? or when accessing the gdbm? should
that be mutex? or semaphore? or compilation with Appartment Threaded?
or having DATA MULTIPLE at linker level? Thanks in advance for your
help.
Jason Demiros
(e-mail address removed)
if you could please advice:
In a web-based app multiple users can query a VC DLL. The function
that is called is a Search(char *string) function. The latter is
exported by a DLL that fetches information from a hash database, gdbm.
When using MonitorEnter, MonitorExit on JNI side it has very low
performance but works. Else, it mixes results from different users, in
a non-consistent manner. This is natural since the DLL is not
multithreaded. The question is: Should I create a separate thread at
the level of the Search() function? or when accessing the gdbm? should
that be mutex? or semaphore? or compilation with Appartment Threaded?
or having DATA MULTIPLE at linker level? Thanks in advance for your
help.
Jason Demiros
(e-mail address removed)