Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Objective-c > NSLocker/Single...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 905 of 1009
Post > Topic >>

NSLocker/Singleton, NSThread or what?

by YL <elim.qiu@[EMAIL PROTECTED] > Sep 19, 2007 at 06:14 PM

I'm integrating a c implementation of math/logic expressioin
evaluation, to my EBusinessElements framework so that the business
rules can be stored in the database and be edited/managed/used at
runtime. As Enterprise Objects at runtime, the records need to behave
according to their type as well as the custom settings, and as
database records, they need to hold the type ids as well as the custom
settings in the form of expressions (text). And the dynamic math/logic
expression evaluator is thus the key for the whole architecture.

http://www.parsifalsoft.com/examples/evalexpression/index.html
is the
link to get the c implementation of an expression handler. And I was
able to make it work with my web applications. But I have to deal with
the concurrent requests issues: the C-implementation of the parssor is
obviously not thread save. For a typical multi-session web
application, I have to consider how to make the handler save among
various sessions.

The C code uses two gloables to store the evaluation results, unless I
modify the C code a lot, I have to find ObjC side solutions.

NSLocker/Singleton is obviously a solution. My question for this are:
Any performance price to pay, and how to make singletom class?

Another way is kind of popular: using multi-thread evaluators. But
then I have to modify the C code and work with NSThread. But I don't
know how.

Any ideas? Thanks
 




 1 Posts in Topic:
NSLocker/Singleton, NSThread or what?
YL <elim.qiu@[EMAIL PR  2007-09-19 18:14:28 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 5:44:33 CDT 2008.