Skip to content

Commit

Permalink
Support multiple argument in pthread err/dbg wrappers (#21266)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbc100 authored Feb 6, 2024
1 parent 1b2a2ab commit d4ddcf0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/library_pthread.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ var LibraryPThread = {

// Prefix all err()/dbg() messages with the calling thread ID.
var origDbg = dbg;
dbg = (message) => origDbg(pthreadLogPrefix() + message);
dbg = (...args) => origDbg(pthreadLogPrefix() + args.join(' '));
#if PTHREADS_DEBUG
// With PTHREADS_DEBUG also prefix all err() messages.
var origErr = err;
err = (message) => origErr(pthreadLogPrefix() + message);
err = (...args) => origErr(pthreadLogPrefix() + args.join(' '));
#endif
},
#endif
Expand Down

0 comments on commit d4ddcf0

Please sign in to comment.