RE: Is JMeterContextService.getContext() thread safe? Should it b e such?

2004-03-23 Thread BAZLEY, Sebastian
ResultCollector) S. -Original Message- From: mstover [mailto:[EMAIL PROTECTED] Sent: 22 March 2004 14:26 To: JMeter Developers List Subject: RE: Is JMeterContextService.getContext() thread safe? Should it b e such? I'm not talking about making the context itself read-only, just the

RE: Is JMeterContextService.getContext() thread safe? Should it b e such?

2004-03-22 Thread mstover
I'm not talking about making the context itself read-only, just the getContext() method that retrieves the context according to the current thread. Each context should be accessible only to a single thread via this strategy and shouldn't need synchronization for read or write operations. I wouldn

RE: Is JMeterContextService.getContext() thread safe? Should it b e such?

2004-03-22 Thread BAZLEY, Sebastian
Forgot to say that JMeterThread initialises the context field - in the samplers at least -before starting the test run. S. -Original Message- From: BAZLEY, Sebastian Sent: 22 March 2004 13:01 To: 'JMeter Developers List' Subject: RE: Is JMeterContextService.getContext() thread safe? Should

RE: Is JMeterContextService.getContext() thread safe? Should it b e such?

2004-03-22 Thread BAZLEY, Sebastian
Not sure it should be read-only. The context is useful (and already used?) for communicating information within a thread. I recently added a version of getContext() to AbstractTestElement that caches the context variable. The idea being that the TestElements are all cloned per thread, and so ther