Start a Conversation

Unsolved

This post is more than 5 years old

531

June 25th, 2009 10:00

Smarts Perl Modules Thread Friendly?

Does anyone know if the Smarts Perl Modules are Thread friendly? I have a multithreaded perl script, which is connecting to the domain in several of the threads, and it seems that when two threads are trying to access my SMARTS domain I receive an exception ( type 9 (Protocol error, data size error, or unsupported protocol format) and type 10 (Not attached) ). The domain is still running, so I know that is not the issue.

The Smarts Perl documentation does not describe if the modules are thread friendly. Any one know for sure?

Thanks,
Chris Golding

53 Posts

June 25th, 2009 10:00

IMHO threading in PERL is iffy at best. The functions of the SMARTS API, however, should (thats a big SHOULD) be thread friendly.

- TC

2 Intern

 • 

138 Posts

June 25th, 2009 17:00

Hi,
My opinion is to perform transactions in domain with multithread but, attach to domain is single.
And why do you need many connections to one domain ?

4 Posts

June 26th, 2009 06:00

I am currently making a single session connection in my main thread, and then using that connection in the child threads. I have several threads connecting to the domain to: subscribe to events, periodicly write various data to an object in the domain, get additional details about an event, and a couple of other actions that occur in different threads. This works fine as long as there is only an event or two coming in via my thread subscribing, but when there are several events coming in at the same time, I begin to see the issue, specificly when an event is being recieved and when I'm writing data to the domain.

~Chris
No Events found!

Top