God will take a
You are born with wings, why actually willing to crawl life, shaped like pests?
"Learning without thought is labor lost, thought without learning is perilous" means:
"Inner thinking" learn to think well of practice should be combined with the "relationship" way of thinking.
Otherwise, direct learning "thinking inside", beginners will practice in trouble, which is indiscriminately.
The only rely on "relationship" way of thinking, it will bring great harm, which is perilous. Author: Jane book links the mind of players: https://www.jianshu.com/p/2940cf732b94 sources
"In-thinking" directly "see" images with a sense of God consciousness yuan, is the need to go through after a period of practice in order to achieve the state. Without practice, not easy to do.
Historical Origins
First, tell us about the historical origins of the library, from the contributors of view, ST is not personal works, but has a strong business background and application support, such as servers, in here you can see the ST had as an Apache module multicore applications release.
Divest its birth was originally developed by Netscape (Netscape) company MSPR (Netscape Portable Runtime library) project out, after a SGI (Silicon Graphic Inc) as well as Yahoo! Inc. (the former is the main) development and maintenance of a separate thread library.
Version, as SourceForge open source project,
Since the release of v1.0 2001 until 2009 v1.9 stable release no further changes.
In terms of platform migration, you can see ST supports a variety of Unix-like platforms, there are also special for rewriting the source code from Win32 Makefile configuration options.
Source example, a web server, proxy dns three kinds of programming and reference examples.
It can be said that the quality of the code should be quite stable and reliable.
card
Coroutine library | Language | Developers |
---|---|---|
state threads library | 3000 lines of C code | Historical Origins |
Libtask | a Coroutine Library for C and Unix |
Learning Record
A, doc
Read the document 1, a total of 5 times eggplant dish takes 130 minutes
ST understanding is still essentially based on EDSM model , but is intended to replace the traditional asynchronous callback mode for Internet application order born of State Threads
Involve content
State Threads Library Documentation
- Introductory paper
- Complete reference
- Programming notes
- Frequently Asked Questions and answers (FAQ)
Key words:
- ST scheduler (do not know)
the ST scheduler is hidden inside the library and invisible to an application writer.
- traditional EDSM (do not know)
event-driven state machines (EDSM)
- virtual processor (do not know)
ST multi-core architecture
- , ST's threads can be linearly processed I / O events concurrently (understand)
-
execute state event wait queue
-
setjmp / longjmp (understand)
-
I looked at the code and understand the operation of an example
-
The Go scheduler
-
Finite-State--TCP Machine TCP finite state machine
Read the document 2, the cumulative number eggplant dish 3 took 100 minutes
理解 Libtask: a Coroutine Library for C and Unix 含义
Involve content
Two, code
|
|
三、talk
-
task compiled into dynamic and static libraries 30 minutes
1 2 3 4 5 6 7 8 9 10 11 12 13 14
git clone https://github.com/wangcy6/state-threads.git cd state-threads make linux-debug //不同平台 state-threads/obj/ libst.so.1.9 libst.a cd examples/ make linux-debug //不同平台 EXAMPLES = $(OBJDIR)/lookupdns $(OBJDIR)/proxy $(OBJDIR)/server ./lookupdns www.baidu.com www.google.com www.bing.com
Project Application
No
reference