Menu

#2 Enhancing TRpcServer.DataPosted, threading and the parser.

open
nobody
None
5
2004-01-21
2004-01-21
No

From my inspection of the parser code and
TRPCServerParser, there is no reason, except possibly a
performance reason why the GetParser method should
not allocate a new TRPCParser on each call.

This would mean that there would not have to be any
critical section round the parser, as each parser would
be created inthe context of the calling thread.

To maintain backwards compatibility if the critical
section is moved to the class TRpcServerParser and calls
added to TRpcServerParser.lock /
TRpcServerParser.unlock (both public virtual) in the Data
Posted event, then a TBaseRPCServerParser and
TThreadedRPCServerParser can be easil implemented to
provide a Threaded Parser at the expense of object
createion time.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.