1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Sign JSON objects in worker threads

This commit is contained in:
Chocobozzz 2023-10-24 10:45:17 +02:00
parent 9e2166a16f
commit edc3ff6085
No known key found for this signature in database
GPG key ID: 583A612D890159BE
12 changed files with 185 additions and 48 deletions

View file

@ -0,0 +1,8 @@
import { isMainThread } from 'node:worker_threads'
import { logger } from './logger.js'
export function assertIsInWorkerThread () {
if (!isMainThread) return
logger.error('Caller is not in worker thread', { stack: new Error().stack })
}