awesome-repositories.com
المدونة
awesome-repositories.com

اكتشف أفضل مستودعات المصادر المفتوحة باستخدام بحث مدعوم بالذكاء الاصطناعي.

استكشفعمليات بحث منسقةبدائل مفتوحة المصدربرمجيات ذاتية الاستضافةالمدونةخريطة الموقع
المشروعحولكيفية ترتيب النتائجالصحافةخادم MCP
قانونيالخصوصيةالشروط
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
andywer avatar

andywer/threads.js

0
View on GitHub↗
3,526 نجوم·170 تفرعات·TypeScript·mit·5 مشاهداتthreads.js.org↗

Threads.js

threads.js is a JavaScript worker thread library and asynchronous task orchestrator designed to offload CPU-intensive tasks to background threads. It functions as a cross-platform worker pool and a TypeScript worker runner that automatically transpiles and executes TypeScript files within separate threads.

The project distinguishes itself by providing a unified worker API that allows for cross-platform execution across different JavaScript environments. It includes a specialized worker data serialization tool to pass complex class instances and binary data between threads, and supports inlining worker source code as binary blobs.

The library covers a broad range of capabilities including thread pool management, concurrency control, and task cancellation. It also provides mechanisms for binary data transfer via memory buffers, worker error propagation with stack traces, and code sandboxing for isolating security-critical logic.

Features

  • JavaScript Multi-Threading - Implements an execution model that enables multi-threaded operation for JavaScript engines to bypass the event loop.
  • Node.js Worker Thread Pools - Maintains a queue of tasks and a fixed set of workers to balance CPU load and resource consumption.
  • Complex Data Serialization - Supports registering custom serializers to pass class instances and non-cloneable data types between threads.
  • Blocking Task Offloaders - Executes CPU intensive tasks in background threads to prevent blocking the main thread.
  • TypeScript Transpilers - Automatically compiles TypeScript source files into JavaScript at runtime before spawning worker threads.
  • Cross-Platform Worker APIs - Provides a unified worker API that allows for cross-platform execution across different JavaScript environments.
  • Thread Pools - Manages a controlled group of worker threads to distribute bulk tasks and prevent system resource exhaustion.
  • General Purpose - Organizes bulk task executions using thread pools to optimize resource usage and increase overall throughput.
  • TypeScript Execution - Enables running TypeScript files in worker threads by automatically transpiling the code during execution.
  • Background Thread Integration - Executes TypeScript logic in worker threads with automatic transpilation and seamless promise-based communication.
  • Asynchronous Worker Functions - Allows defining functions within worker threads to handle asynchronous calls originating from the main execution thread.
  • Message-to-Promise Proxies - Wraps worker postMessage calls in promises to allow asynchronous function calls between the main thread and workers.
  • Asynchronous Task Orchestrators - Functions as a system for queuing and managing asynchronous jobs with support for task cancellation and concurrency control.
  • Background Thread Dispatchers - Runs functions in separate threads and proxies the return values back to the main thread to maintain responsiveness.
  • Concurrent Task Limiters - Limits the number of concurrent worker threads to prevent system resource exhaustion during CPU-intensive tasks.
  • Unified Worker APIs - Provides a consistent interface for spawning and communicating with workers across multiple JavaScript environments.
  • Complex Object Serializers - Translates complex class instances into cloneable formats to bypass the limitations of the structured clone algorithm.
  • Pending Task Cancellations - Provides the ability to remove pending tasks from the execution queue before they are picked up by a worker thread.
  • Worker Lifecycle Management - Manages the creation and termination of worker threads to optimize resource usage.
  • Distributed Task Workers - Assigns bulk tasks across a controlled group of workers to process high-volume workloads in a predictable manner.
  • Worker Source Inlining - Converts worker source code into binary blob URLs to execute background logic without requiring separate physical files.
  • Inter-Thread Data Transfers - Moves ownership of ArrayBuffers between threads to avoid expensive data copying for large binary datasets.
  • JavaScript Runtime Compatibility Layers - Provides a consistent interface to wrap platform-specific worker implementations for compatibility across different JavaScript environments.
  • JavaScript Runtime Portability - Allows running worker thread logic across different JavaScript environments without modifying the source code.
  • Worker Thread Runners - Automatically transpiles and executes TypeScript files within separate worker threads.
  • Worker Process Error Reporting - Forwards errors from a worker thread to the main thread's promise chain including the original stack trace.
  • Observable Streams - Uses a push-based stream of events to transmit continuous updates from a background thread to the main thread.
  • Task Completion Tracking - Tracks the progress of all queued tasks and resolves only after every job has finished or failed.
  • Reactive Worker Streams - Implements a push-based stream using observables to transmit continuous updates from worker threads to the main thread.
  • Web Worker Management - Uniform API for worker threads.

سجل النجوم

مخطط تاريخ النجوم لـ andywer/threads.jsمخطط تاريخ النجوم لـ andywer/threads.js

بحث بالذكاء الاصطناعي

استكشف المزيد من المستودعات الرائعة

صف ما تحتاجه بلغة بسيطة — وسيقوم الذكاء الاصطناعي بترتيب آلاف المشاريع مفتوحة المصدر المنسقة حسب الصلة.

Start searching with AI

بدائل مفتوحة المصدر لـ Threads.js

مشاريع مفتوحة المصدر مشابهة، مرتبة حسب عدد الميزات المشتركة مع Threads.js.
  • googlechromelabs/comlinkالصورة الرمزية لـ GoogleChromeLabs

    GoogleChromeLabs/comlink

    12,715عرض على GitHub↗

    Comlink is a remote procedure call library that transforms message-based communication into asynchronous function calls between the main thread and web workers. It provides a proxy-based interface that allows multiple threads to interact with a single object instance without manual message handling. The project enables the execution of functions across separate browser windows, iframes, and web workers, making external calls behave like local asynchronous operations. It supports the transfer of non-cloneable data through custom serialization handlers and allows for the movement of ownership f

    TypeScript
    عرض على GitHub↗12,715
  • bogdanp/dramatiqالصورة الرمزية لـ Bogdanp

    Bogdanp/dramatiq

    5,136عرض على GitHub↗

    Dramatiq is a distributed task queue and workload manager used to offload function execution to background workers. It functions as an asynchronous task orchestrator that enables the distribution of computational tasks across a cluster using a pluggable transport layer supporting RabbitMQ and Redis. The framework provides specialized tools for complex task orchestration, including the ability to link background jobs into sequences, pipelines, and barriers. It further manages distributed concurrency through the use of shared mutexes, rate limiters, and exponential backoff retries to prevent re

    Pythondistributed-lockpythonrabbit
    عرض على GitHub↗5,136
  • developit/greenletالصورة الرمزية لـ developit

    developit/greenlet

    4,689عرض على GitHub↗

    Greenlet is a multi-threaded asynchronous executor and web worker task runner. It serves as an execution wrapper that offloads heavy computation to background workers to maintain user interface responsiveness and prevent the main execution thread from blocking. The project includes a transferable object handler designed to move large data buffers between threads. This mechanism avoids the overhead of memory copying to optimize data transfer. The library covers the management of web workers, facilitating asynchronous task isolation and main thread offloading.

    JavaScript
    عرض على GitHub↗4,689
  • ruby-concurrency/concurrent-rubyالصورة الرمزية لـ ruby-concurrency

    ruby-concurrency/concurrent-ruby

    5,830عرض على GitHub↗

    Concurrent Ruby is a comprehensive concurrency toolkit for the Ruby language that provides thread-safe data structures, synchronization primitives, and asynchronous execution patterns. It implements core concurrency abstractions including an actor model framework where isolated actors communicate through asynchronous message passing, a future and promise system for composing non-blocking operations, and thread pool executors that manage reusable worker threads for concurrent task execution. The library distinguishes itself through a broad set of coordination mechanisms that go beyond basic th

    Ruby
    عرض على GitHub↗5,830
عرض جميع البدائل الـ 30 لـ Threads.js→

الأسئلة الشائعة

ما هي وظيفة andywer/threads.js؟

threads.js is a JavaScript worker thread library and asynchronous task orchestrator designed to offload CPU-intensive tasks to background threads. It functions as a cross-platform worker pool and a TypeScript worker runner that automatically transpiles and executes TypeScript files within separate threads.

ما هي الميزات الرئيسية لـ andywer/threads.js؟

الميزات الرئيسية لـ andywer/threads.js هي: JavaScript Multi-Threading, Node.js Worker Thread Pools, Complex Data Serialization, Blocking Task Offloaders, TypeScript Transpilers, Cross-Platform Worker APIs, Thread Pools, General Purpose.

ما هي البدائل مفتوحة المصدر لـ andywer/threads.js؟

تشمل البدائل مفتوحة المصدر لـ andywer/threads.js: googlechromelabs/comlink — Comlink is a remote procedure call library that transforms message-based communication into asynchronous function… bogdanp/dramatiq — Dramatiq is a distributed task queue and workload manager used to offload function execution to background workers. It… developit/greenlet — Greenlet is a multi-threaded asynchronous executor and web worker task runner. It serves as an execution wrapper that… ruby-concurrency/concurrent-ruby — Concurrent Ruby is a comprehensive concurrency toolkit for the Ruby language that provides thread-safe data… typestrong/ts-node — ts-node is a TypeScript execution engine and just-in-time transpiler for Node.js. It enables the direct execution of… caolan/async — Async is a JavaScript asynchronous flow library designed to manage the execution and coordination of asynchronous…