Use separate jobs to run functions that are not threadsafe

There are several threadsafe mechanisms to submit a new job to complete the processing you need.

When using any of these separate job mechanisms, you need to be aware of the following problems involved with using a different job to complete some of your application processing:
  • Input/output considerations:

    The server job cannot perform normal I/O without conflicting with the application I/O processing. The application I/O processing can affect file offsets or locks that are maintained on system objects. Attempts at I/O can conflict between the jobs.

  • Parameter passing:

    Passing pointers or other types of complex parameters to the functions that are not threadsafe might not be easy to accomplish. That function runs in a separate job. You need to solve the problems involved with passing complex data to that function.

  • Returning function calls:

    The results from the function that is not threadsafe might be more complex than the simple pass/fail type of information that is provided by some of the mechanisms described above. This is similar to the parameter passing issue described above.

  • Job attributes:

    You might have additional complexity to manage when trying to duplicate your application's environment in the server job. For example, if you started your application as user ALICE, and you started the server job as user BOB, the application behavior is not correct.