mbeckerle commented on PR #879:
URL: https://github.com/apache/daffodil/pull/879#issuecomment-1373954062

   I don't have access to my computer today, but I wanted to look this over.
   
   I don't understand at all why a thread pool should make any difference and
   if using a thread pool does matter it suggests we are doing something
   terribly wrong. We should create the coroutine thread exactly once.
   
   
   
   On Fri, Jan 6, 2023, 12:36 PM John Interrante ***@***.***>
   wrote:
   
   > ***@***.**** commented on this pull request.
   > ------------------------------
   >
   > In daffodil-lib/src/main/scala/org/apache/daffodil/util/Coroutines.scala
   > <https://github.com/apache/daffodil/pull/879#discussion_r1063639451>:
   >
   > >   import scala.util.Failure
   >   import scala.util.Success
   >   import scala.util.Try
   >
   > + object Coroutine {
   > +   val executionContext = new ExecutionContext {
   > +     private val threadPool = Executors.newCachedThreadPool()
   > +     def execute(runnable: Runnable): Unit = threadPool.submit(runnable)
   >
   > I didn't know we add only 1 extra thread per SAX unparse call anyway,
   > which is only going to double the total number of threads, not increase the
   > number of threads exponentially. No, we don't need to allow callers to pass
   > in an execution context. I agree it's really on the users to limit their
   > calls if they use Daffodil as a server and make as many SAX unparse calls
   > as there are connections from client machines.
   >
   > —
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/daffodil/pull/879#discussion_r1063639451>, or
   > unsubscribe
   > 
<https://github.com/notifications/unsubscribe-auth/AALUDA6XNMAO4BER2XDRU2TWRBJZ5ANCNFSM6AAAAAASE3OHII>
   > .
   > You are receiving this because you were mentioned.Message ID:
   > ***@***.***>
   >
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to