Feature Requests item #3040027, was opened at 2010-08-05 09:18
Message generated for change (Tracker Item Submitted) made by dkoes
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=428743&aid=3040027&group_id=40728

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: API
Group: 2.2
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: David Koes (dkoes)
Assigned to: Nobody/Anonymous (nobody)
Summary: Thread-safe SMARTS matching (patch provided)

Initial Comment:
The current implementation of smarts parsing and matching is not thread safe 
since it uses global variable.  Attached is an svn diff with the 2-2-x branch 
that removes the usage of global variables and provides a thread-safe stateless 
matcher. With this patch, different threads can safely use different instances 
of OBSmartsPattern to parse and match (this is not currently true do to the use 
of global variables) and different threads can use the same instance of an 
OBSmartsPattern to perform matching with a call to the stateless matcher. My 
opinion is that the old API should be deprecated to discourage non thread-safe 
coding.

The original motivation for this patch was that most of the perception routines 
use smarts matching and so are not thread-safe.  With this patch, they still 
aren't thread safe since they all need to be modified to call the stateless 
matcher.  However, even with that additional modification they remain not 
thread-safe due to other data sharing issues that would require some thought 
and time to resolve well.  I can provide a match that at least makes the smarts 
matching thread-safe is desired.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=428743&aid=3040027&group_id=40728

------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
OpenBabel-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbabel-devel

Reply via email to