SPEC Community

Product Support => Chauffeur-WDK => Topic started by: fjo on April 08, 2015, 11:57:52 AM

Title: Run worklet single-threaded
Post by: fjo on April 08, 2015, 11:57:52 AM
Hello.

Is there a config option to run a worklet only in a single thread and not on multiple threads concurrently?

Thanks for your help!
Title: Re: Run worklet single-threaded
Post by: JeremyArnold on April 15, 2015, 11:41:52 AM
You should be able to do this by adding a setting to your <worklet> settings in config.xml.  Add the following setting:
  <num-transaction-threads>1</num-transaction-threads>

The JVM will still have multiple threads (for garbage collection, JIT, etc.), but Chauffeur will only run transactions in a single thread in each Client JVM.

In many cases you'll also want to set:
  <max-per-client-users>1</max-per-client-users>

This will limit the number of Users (which are often used to hold per-user session data).  Chauffeur will ensure that any user will only have one active transaction at any given time, so either one of these settings will generally work.  I almost always set them to the same value.
Title: Re: Run worklet single-threaded
Post by: Catalinaz on April 19, 2018, 12:51:37 AM
If you want to learn more about these areas, you can learn more.
Title: Re: Run worklet single-threaded
Post by: Nelsonut on April 22, 2018, 10:29:45 PM
I want to know too What to do? Can you tell me?