Skip to content

Commit

Permalink
Merge pull request #2083 from freemandealer/fix-an
Browse files Browse the repository at this point in the history
typo fix for bthread introduction
lorinlee authored Jan 15, 2023
2 parents b734c4e + 518d216 commit 9e8c0db
Showing 48 changed files with 48 additions and 48 deletions.
2 changes: 1 addition & 1 deletion docs/en/threading_overview.md
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ How multi-threaded reactors work and problems related are demonstrated below:

## M:N threading library

This model maps M user threads into N system threads. A M:N threading library is able to decide when and where to run a piece of code and when to end the execution, which is more flexible at scheduling compared to multi-threaded reactors. But full-featured M:N threading libraries are difficult to implement and remaining as active research topics. The M:N threading library that we're talking about is specialized for building online services, in which case, some of the requirements can be simplified, namely no (complete) preemptions and priorities. M:N threading libraries can be implemented either in userland or OS kernel. New programming languages prefer implementations in userland, such as GHC thread and goroutine, which is capable of adding brand-new keywords and intercepting related APIs on threading. Implementation in existing languages often have to modify the OS kernel, such as [Windows UMS](https://msdn.microsoft.com/en-us/library/windows/desktop/dd627187(v=vs.85).aspx) and google SwicthTo(which is 1:1, however M:N effects can be achieved based on it). Compared to N:1 threading libraries, usages of M:N threading libraries are more similar to system threads, which need locks or message passings to ensure thread safety.
This model maps M user threads into N system threads. An M:N threading library is able to decide when and where to run a piece of code and when to end the execution, which is more flexible at scheduling compared to multi-threaded reactors. But full-featured M:N threading libraries are difficult to implement and remaining as active research topics. The M:N threading library that we're talking about is specialized for building online services, in which case, some of the requirements can be simplified, namely no (complete) preemptions and priorities. M:N threading libraries can be implemented either in userland or OS kernel. New programming languages prefer implementations in userland, such as GHC thread and goroutine, which is capable of adding brand-new keywords and intercepting related APIs on threading. Implementation in existing languages often have to modify the OS kernel, such as [Windows UMS](https://msdn.microsoft.com/en-us/library/windows/desktop/dd627187(v=vs.85).aspx) and google SwicthTo(which is 1:1, however M:N effects can be achieved based on it). Compared to N:1 threading libraries, usages of M:N threading libraries are more similar to system threads, which need locks or message passings to ensure thread safety.

# Issues

2 changes: 1 addition & 1 deletion src/bthread/bthread.cpp
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Tue Jul 10 17:40:58 CST 2012

2 changes: 1 addition & 1 deletion src/bthread/bthread.h
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Tue Jul 10 17:40:58 CST 2012

2 changes: 1 addition & 1 deletion src/bthread/butex.cpp
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Tue Jul 22 17:30:12 CST 2014

2 changes: 1 addition & 1 deletion src/bthread/butex.h
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Tue Jul 22 17:30:12 CST 2014

2 changes: 1 addition & 1 deletion src/bthread/comlog_initializer.h
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Mon Sep 15 10:51:15 CST 2014

2 changes: 1 addition & 1 deletion src/bthread/condition_variable.cpp
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Sun Aug 3 12:46:15 CST 2014

2 changes: 1 addition & 1 deletion src/bthread/condition_variable.h
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: 2015/12/14 21:26:26

2 changes: 1 addition & 1 deletion src/bthread/countdown_event.cpp
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: 2016/06/03 13:15:24

2 changes: 1 addition & 1 deletion src/bthread/countdown_event.h
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: 2016/06/03 13:06:40

2 changes: 1 addition & 1 deletion src/bthread/errno.cpp
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Wed Jul 30 11:47:19 CST 2014

2 changes: 1 addition & 1 deletion src/bthread/errno.h
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Wed Jul 30 11:47:19 CST 2014

2 changes: 1 addition & 1 deletion src/bthread/execution_queue.cpp
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: 2016/04/16 18:43:24

2 changes: 1 addition & 1 deletion src/bthread/execution_queue.h
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: 2015/10/23 18:16:16

2 changes: 1 addition & 1 deletion src/bthread/execution_queue_inl.h
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: 2015/10/27 17:39:48

2 changes: 1 addition & 1 deletion src/bthread/fd.cpp
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Thu Aug 7 18:56:27 CST 2014

2 changes: 1 addition & 1 deletion src/bthread/id.cpp
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Sun Aug 3 12:46:15 CST 2014

2 changes: 1 addition & 1 deletion src/bthread/id.h
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Tue Jul 10 17:40:58 CST 2012

2 changes: 1 addition & 1 deletion src/bthread/interrupt_pthread.cpp
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Tue Jul 10 17:40:58 CST 2012

2 changes: 1 addition & 1 deletion src/bthread/interrupt_pthread.h
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Tue Jul 10 17:40:58 CST 2012

2 changes: 1 addition & 1 deletion src/bthread/key.cpp
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Sun Aug 3 12:46:15 CST 2014

2 changes: 1 addition & 1 deletion src/bthread/list_of_abafree_id.h
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Mon Jun 20 11:57:23 CST 2016

2 changes: 1 addition & 1 deletion src/bthread/log.h
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Mon Sep 15 10:51:15 CST 2014

2 changes: 1 addition & 1 deletion src/bthread/mutex.cpp
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Sun Aug 3 12:46:15 CST 2014

2 changes: 1 addition & 1 deletion src/bthread/mutex.h
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: 2015/12/14 18:17:04

2 changes: 1 addition & 1 deletion src/bthread/parking_lot.h
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: 2017/07/27 23:07:06

2 changes: 1 addition & 1 deletion src/bthread/processor.h
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Fri Dec 5 13:40:57 CST 2014

2 changes: 1 addition & 1 deletion src/bthread/remote_task_queue.h
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Sun, 22 Jan 2017

2 changes: 1 addition & 1 deletion src/bthread/stack.cpp
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Sun Sep 7 22:37:39 CST 2014

2 changes: 1 addition & 1 deletion src/bthread/stack.h
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Sun Sep 7 22:37:39 CST 2014

2 changes: 1 addition & 1 deletion src/bthread/stack_inl.h
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Sun Sep 7 22:37:39 CST 2014

2 changes: 1 addition & 1 deletion src/bthread/sys_futex.cpp
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Wed Mar 14 17:44:58 CST 2018

2 changes: 1 addition & 1 deletion src/bthread/sys_futex.h
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Tue Jul 10 17:40:58 CST 2012

2 changes: 1 addition & 1 deletion src/bthread/task_control.cpp
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Tue Jul 10 17:40:58 CST 2012

2 changes: 1 addition & 1 deletion src/bthread/task_control.h
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Tue Jul 10 17:40:58 CST 2012

2 changes: 1 addition & 1 deletion src/bthread/task_group.cpp
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Tue Jul 10 17:40:58 CST 2012

2 changes: 1 addition & 1 deletion src/bthread/task_group.h
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Tue Jul 10 17:40:58 CST 2012

2 changes: 1 addition & 1 deletion src/bthread/task_group_inl.h
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Tue Jul 10 17:40:58 CST 2012

2 changes: 1 addition & 1 deletion src/bthread/task_meta.h
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Tue Jul 10 17:40:58 CST 2012

2 changes: 1 addition & 1 deletion src/bthread/timer_thread.cpp
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.


#include <queue> // heap functions
2 changes: 1 addition & 1 deletion src/bthread/timer_thread.h
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.


#ifndef BTHREAD_TIMER_THREAD_H
2 changes: 1 addition & 1 deletion src/bthread/types.h
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Tue Jul 10 17:40:58 CST 2012

2 changes: 1 addition & 1 deletion src/bthread/unstable.h
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Tue Jul 10 17:40:58 CST 2012

2 changes: 1 addition & 1 deletion src/bthread/work_stealing_queue.h
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.

// bthread - A M:N threading library to make applications more concurrent.
// bthread - An M:N threading library to make applications more concurrent.

// Date: Tue Jul 10 17:40:58 CST 2012

Loading

0 comments on commit 9e8c0db

Please sign in to comment.