All Projects → Blitz-Mobile-Apps → react-native-bg-thread

Blitz-Mobile-Apps / react-native-bg-thread

Licence: MIT license
react-native-bg-thread

Programming Languages

java
68154 projects - #9 most used programming language
objective c
16641 projects - #2 most used programming language
ruby
36898 projects - #4 most used programming language
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-native-bg-thread

React Native Multithreading
🧵 Fast and easy multithreading for React Native using JSI
Stars: ✭ 164 (+264.44%)
Mutual labels:  multithreading, threading
ObviousAwait
🧵 Expressive aliases to ConfigureAwait(true) and ConfigureAwait(false)
Stars: ✭ 55 (+22.22%)
Mutual labels:  multithreading, threading
thread-pool
BS::thread_pool: a fast, lightweight, and easy-to-use C++17 thread pool library
Stars: ✭ 1,043 (+2217.78%)
Mutual labels:  multithreading, threading
Track-Stargazers
Have fun tracking your project's stargazers
Stars: ✭ 38 (-15.56%)
Mutual labels:  multithreading, threading
Microjob
A tiny wrapper for turning Node.js worker threads into easy-to-use routines for heavy CPU loads.
Stars: ✭ 1,985 (+4311.11%)
Mutual labels:  multithreading, threading
Concurrencpp
Modern concurrency for C++. Tasks, executors, timers and C++20 coroutines to rule them all
Stars: ✭ 340 (+655.56%)
Mutual labels:  multithreading, threading
dannyAVgleDownloader
知名網站avgle下載器
Stars: ✭ 27 (-40%)
Mutual labels:  multithreading, threading
Pht
A new threading extension for PHP
Stars: ✭ 175 (+288.89%)
Mutual labels:  multithreading, threading
Thread
type safe multi-threading made easier
Stars: ✭ 34 (-24.44%)
Mutual labels:  multithreading, threading
tcp server client
A thin and simple C++ TCP client server
Stars: ✭ 124 (+175.56%)
Mutual labels:  multithreading
Tieba-Birthday-Spider
百度贴吧生日爬虫,可抓取贴吧内吧友生日,并且在对应日期自动发送祝福
Stars: ✭ 28 (-37.78%)
Mutual labels:  threading
Master-Thesis
Deep Reinforcement Learning in Autonomous Driving: the A3C algorithm used to make a car learn to drive in TORCS; Python 3.5, Tensorflow, tensorboard, numpy, gym-torcs, ubuntu, latex
Stars: ✭ 33 (-26.67%)
Mutual labels:  multithreading
llb
Dead simple event-driven load-balancer
Stars: ✭ 27 (-40%)
Mutual labels:  multithreading
Chatroom-in-C
A simple Chatroom built in C programming language. The program is built uses multithreading for handling multiple clients.
Stars: ✭ 51 (+13.33%)
Mutual labels:  multithreading
gostore
Storage algorithms.
Stars: ✭ 34 (-24.44%)
Mutual labels:  multithreading
ECS-Phyllotaxis
Learning ECS - 100k Cubes in Phyllotaxis pattern
Stars: ✭ 17 (-62.22%)
Mutual labels:  multithreading
python-json-socket
JSON messaging based socket interface with multi-threaded server and client
Stars: ✭ 52 (+15.56%)
Mutual labels:  threading
QCircuitFaultEditor
A manager client for IC faults detecting training.
Stars: ✭ 18 (-60%)
Mutual labels:  multithreading
Boting
Simple but powerful Telegram Bot library
Stars: ✭ 21 (-53.33%)
Mutual labels:  multithreading
bsuir-csn-cmsn-helper
Repository containing ready-made laboratory works in the specialty of computing machines, systems and networks
Stars: ✭ 43 (-4.44%)
Mutual labels:  multithreading

react-native-bg-thread

This package helps in executing the javascript in a background thread. Time-consuming javascript code is shifted to a native background thread by freeing the main-UI thread, which helps in increasing the efficiency of the application. Thread priority can be handled by passing in the appropriate flags. Currently we support three types of flag as under:

Priority Flags Description Android thread value IOS thread value
MAX This sets the thread priority to the maximum available on the corresponding native platform. 10 1.0
MIN This sets the thread priority to the minmimum available on the corresponding native platform. 1 0.1
NORMAL This sets the thread priority to the default or normal on the corresponding native platform. 5 0.5

Getting started

$ npm install --save react-native-bg-thread

Linking

iOS

1. 	Add pod 'react-native-bg-thread', :path => '../node_modules/react-native-bg-thread/react-native-bg-thread.podspec' to your pod file under targets
	Run following commands
2. 	cd ios
3. 	pod install

Android

No further action needed

Usage

Example 1

import RnBgTask from 'react-native-bg-thread';

	componentDidMount(){
		RnBgTask.runInBackground_withPriority("MIN",()=>{
		
		// Your Javascript code here
		// Javascript executed here runs on the passed thread priority which in this case is minimum.
			
		}) 
	}

Example 2

import RnBgTask from 'react-native-bg-thread';

	componentDidMount(){
		RnBgTask.runInBackground(()=>{
		
		// Your Javascript code here
		// Javascript executed here runs on the default thread priority which is maximum.
			
		})
	}

License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].