Single-Threaded vs Multi-Threaded - Deepstash

Explore the World's Best Ideas

Join today and uncover 100+ curated journeys from 50+ topics. Unlock access to our mobile app with extensive features.

Single-Threaded vs Multi-Threaded

Single-threaded means that a process is designed to have only one thread of execution. This means only one set of instructions executes at once.

Multi-threaded means that a process has two or more threads. So it can execute multiple instructions simultaneously.

As a multi-threaded program, several instructions can run at a time. Let’s pretend this program has two threads. So, the program can run two instructions at a time.

7

27 reads

MORE IDEAS ON THIS

Solution Animation + Data Flow

Solution Animation + Data Flow

Imagine having a like animation and a counter. When the like is pressed the counter should increment.

A person using the interface doesn’t know about how data flux is designed, what is a network request. The person just expects the heart to be colored immediately.

As React Native is s...

7

46 reads

React Native is Multi-Processed

React Native is Multi-Processed

Instead of running multiple threads, React Native runs multiple processes. 3 main processes run in React Native. (Even if they are called threads)

  1. UI Thread
  2. JS Thread
  3. Render Thread / Shadow Tree

7

34 reads

Intro

Intro

Thread. You can think of a thread as a set of instructions to be executed by the CPU. A thread is a component of a process.

Process. A process is a program that is running. For example, the bro...

8

108 reads

React Native is Single-Threaded

Because React Native is single-threaded, if you have a process that has many responsibilities, you can have performance problems. Imagine you have a process responsible for rendering a video on the screen and a live feed of comments on the video. The video rendering could block the live feed from...

7

28 reads

One Application - Multiple Processes

One Application - Multiple Processes

Every process has one or more threads. And a program can actually be made up of many processes. In the example above, you’ll notice that it says Google Chrome (44). This means that Google Chrome is actually running 44 different processes. Processes in a single pr...

7

21 reads

Problem With Animations

Problem With Animations

If animation run on JS Thread then for each frame the JS Thread will send serialized data on Bridge to the UI Thread. This will result in something similar with real life traffic jam where we have the bridge and the cars(code for each frame).

In addition of this imagine also doing a networ...

7

17 reads

CURATED FROM

CURATED BY

sabin

Building @deepstash

TL;DR how threading is working in React Native and the solution of handling data flux for a like button and its counter

More like this

Single-Task

Unless the task requires, keep only one or two windows open simultaneously. Don’t keep them minimized either, close them and reopen only if you are taking a break or the task at hand is finished.

By minimizing the sources of distraction you will have an easier time diving into cog...

Holmes practices mindfulness

Mindfulness means focusing on only one problem or activity at a time.

Our brain cannot do two things at once. “What we believe is multi-tasking is really the brain switching quickly from one task to the next.” 

A study points out that those who are multi-taskers are less...

How to Increase Your VO2 Max (cont.)

How to Increase Your VO2 Max (cont.)

VO2 max is like a muscle of its own. If you run at the same easy pace for the same amount of time every day, you won't get faster or better at running. 

Instead, try adding intervals to your run. For example: 

  • Run fast for one minute
  • Jog slowly f...

Read & Learn

20x Faster

without
deepstash

with
deepstash

with

deepstash

Access to 200,000+ ideas

Access to the mobile app

Unlimited idea saving & library

Unlimited history

Unlimited listening to ideas

Downloading & offline access

Personalized recommendations

Supercharge your mind with one idea per day

Enter your email and spend 1 minute every day to learn something new.

Email

I agree to receive email updates