schema-driven development define your types and the appropriate queries and mutations for them. implemetns functions called resolvers to handle these types and their fields. as new requirements arrive, go back to step 1 update the schema. about relay a mechanism for refetching an object a description of how to page through connections structure around mutation to make them prediatable
concurrent-programming: programs can run in independent with each other. parallel programming: program can run at same time.
as a low-level language, rust need less abstraction and more control.
use thread process vs thread
programs:
Race conditions: data-race. resource-race. DeakLock difficult concurrent bug. os-thread vs green-thread: 1:1 vs M:N
/// thread examples /// when the main-thread exit, the fork-thread will exit too. /// just like python thread.deamon flag. use std::thread; use std::time::Duration; fn main() { thread::spawn(|| { for i in 1.
unsafe-rust advance-trait trait-ref-type 与trait相关的关联类型 default type param 默认参数类型 fully qualified syntax 完全限定语法 supertraits 超父类 newtype模式 advance-type more about new-type pattern type alias 类型别名 never type dymatic-size type 动态大小类型 advance function and closure function point 函数指针 return closure 返回闭包 macro 宏 unsafe-rust the-addional-super power of unsafe
解引用裸指针 调用不安全的函数或方法 访问或修改可变静态变量 实现不安全的trait 访问union字段 the owner-check is still on
unref-raw-point ignore owner-rule, allow mut and immute ref.