show variables like 'tx_isolation'; -- REPEATABLE-READ
-- set tx_isolation = 'READ-COMMITTED';
set session transaction isolation level READ COMMITTED;
show variables like 'tx_isolation'; -- READ-COMMITTED
set session transaction isolation level REPEATABLE READ;
Key | Description |
---|---|
ctrl+a | ๋ช ๋ น์ค ์ฒ์์ผ๋ก ์ด๋ |
ctrl+e | ๋ช ๋ น์ค ๋์ผ๋ก ์ด๋ |
meta+f | ์ปค์๋ก๋ถํฐ ๋จ์ด ๋จ์ ์ ๋ฐฉ ์ด๋ |
meta+b | ์ปค์๋ก๋ถํฐ ๋จ์ด ๋จ์ ํ๋ฐฉ ์ด๋ |
meta+d | ์ปค์๋ก๋ถํฐ ์ ๋ฐฉ ํ ๋จ์ด์ฉ ์ญ์ |
ctrl+k | ์ปค์~๋๊น์ง ์ญ์ |
์ฐธ๊ณ
"๋จ์ด"๋ ํน์๋ฌธ์๋ฅผ ์ ์ธํ ๋ฌธ์/์ซ์๋ก ๊ตฌ์ฑ๋ ๋จ์ด๋ฅผ ์๋ฏธํจ
intํ ๋ณ์ num1๊ณผ num2๋ฅผ ์ ์ธ๊ณผ ๋์์ ๊ฐ๊ฐ 10๊ณผ 20์ผ๋ก ์ด๊ธฐํํ๊ณ , intํ ํฌ์ธํฐ ๋ณ์ ptr1๊ณผ ptr2๋ฅผ ์ ์ธํ์ฌ ๊ฐ๊ฐ num1๊ณผ num2๋ฅผ ๊ฐ๋ฆฌํค๊ฒ ํ์. ๊ทธ๋ฆฌ๊ณ ์ด ์ํ์์ ํฌ์ธํฐ ๋ณ์ ptr1๊ณผ ptr2๋ฅผ ์ด์ฉํด์ num1์ ๊ฐ์ 10์ ์ฆ๊ฐ์ํค๊ณ , num2์ ๊ฐ์ 10 ๊ฐ์์ํค์. ์ด์ ๋ ํฌ์ธํฐ ๋ณ์ ptr1๊ณผ ptr2๊ฐ ๊ฐ๋ฆฌํค๋ ๋์์ ์๋ก ๋ฐ๊พธ์. ์ฆ, ํฌ์ธํฐ ๋ณ์ ptr1์ด num2๋ฅผ ๊ฐ๋ฆฌํค๊ฒํ๊ณ , ํฌ์ธํฐ ๋ณ์ ptr2๊ฐ num1์ ๊ฐ๋ฆฌํค๊ฒ ํ์. ๊ทธ๋ฆฌ๊ณ ๋ง์ง๋ง์ผ๋ก ptr1๊ณผ ptr2๊ฐ ๊ฐ๋ฆฌํค๋ ๋ณ์์ ์ ์ฅ๋ ๊ฐ์ ์ถ๋ ฅํ์.
์ค์ฑ์ฐ์ ์ดํ C ํ๋ก๊ทธ๋๋ฐ p284
๋น์ ์ด ์ฌ์ฉํ๋ ์ธ์ด๋ฅผ ํํ์ง ๋ง๋ผ. ์ฝ๋๋ฅผ ์๋ฆ๋ต๊ฒ ๋ง๋๋ ๊ฒ์ ํ๋ก๊ทธ๋๋จธ์ด๋ค.
- Ward Cunningham
์ฝ๋๋ ํํธ์ ์ ์ด ์ฐ๋ฌธ์ฒ๋ผ ์ฝํ์ผํ๋ค
- Martin Fowler
$ xcode-select --install # Command Line Tool ์ค์น
$ gcc --version
# Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/# MacOSX10.14.sdk/usr/include/c++/4.2.1
# Apple LLVM version 10.0.0 (clang-1000.10.44.2)
# Target: x86_64-apple-darwin18.0.0
# Thread model: posix
import threading | |
def thread_main(li, i): | |
for i in range(offset * i, offset * (i + 1)): | |
li[i] *= 2 | |
num_elem = 1000 | |
num_thread = 5 | |
offset = num_elem // num_thread | |
li = [i+1 for i in range(num_elem)] |
register()
ํจ์๊ฐ boot()
ํจ์๋ณด๋ค ํญ์ ๋จผ์ ํธ์ถ๋ฉ๋๋ค.
<?php // app/Providers/FooServiceProvider.php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class FooServiceProvider extends ServiceProvider
{
<?php | |
class OrderApiServiceProvider extends ServiceProvider | |
{ | |
public function register() | |
{ | |
$this->bindConfiguration(); | |
$this->bindOrderResourceApi(); | |
} |