ニジカ投稿局 https://tv.nizika.tv
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

9 lines
243 B

  1. import { isMainThread } from 'node:worker_threads'
  2. import { logger } from './logger.js'
  3. export function assertIsInWorkerThread () {
  4. if (!isMainThread) return
  5. logger.error('Caller is not in worker thread', { stack: new Error().stack })
  6. }