Go 101 (Golang 101) v1.21.0make(chan string, 2) vc := reflect.ValueOf(c) vc.Send(reflect.ValueOf("C")) succeeded := vc.TrySend(reflect.ValueOf("Go")) fmt.Println(succeeded) // true succeeded = vc.TrySend(reflect.ValueOf("C++")) Println(succeeded) // false fmt.Println(vc.Len(), vc.Cap()) // 2 2 vs, succeeded := vc.TryRecv() fmt.Println(vs.String(), succeeded) // C true vs, sentBeforeClosed := vc.Recv() fmt.Println(vs.String() String(), sentBeforeClosed) // Go true vs, succeeded = vc.TryRecv() fmt.Println(vs.String()) //fmt.Println(succeeded) // false } The TrySend and TryRecv methods correspond to one-case-one-default 0 码力 | 610 页 | 945.17 KB | 1 年前3
Go 101 (Golang 101) v1.21.02) 8| vc := reflect.ValueOf(c) 9| vc.Send(reflect.ValueOf("C")) 10 | succeeded := vc.TrySend(reflect.ValueOf("Go")) 11 | fmt.Println(succeeded) // true 12 | succeeded = vc.TrySend(reflect 14 | fmt.Println(vc.Len(), vc.Cap()) // 2 2 15 | vs, succeeded := vc.TryRecv() 16 | fmt.Println(vs.String(), succeeded) // C true 17 | vs, sentBeforeClosed := vc.Recv() 18 | fmt fmt.Println(vs.String(), sentBeforeClosed) // Go true 19 | vs, succeeded = vc.TryRecv() 20 | fmt.Println(vs.String()) //21 | fmt.Println(succeeded) // false 22 | } The 0 码力 | 880 页 | 833.34 KB | 1 年前3
Golang 101(Go语言101 中文版) v1.21.a2) 8| vc := reflect.ValueOf(c) 9| vc.Send(reflect.ValueOf("C")) 10 | succeeded := vc.TrySend(reflect.ValueOf("Go")) 11 | fmt.Println(succeeded) // true 12 | succeeded = vc.TrySend(reflect 14 | fmt.Println(vc.Len(), vc.Cap()) // 2 2 15 | vs, succeeded := vc.TryRecv() 16 | fmt.Println(vs.String(), succeeded) // C true 17 | vs, sentBeforeClosed := vc.Recv() 18 | fmt fmt.Println(vs.String(), sentBeforeClosed) // Go true 19 | vs, succeeded = vc.TryRecv() 20 | fmt.Println(vs.String()) // <$1> 21 | fmt.Println(succeeded) // false 22 | } reflect.Value0 码力 | 821 页 | 956.82 KB | 1 年前3
Golang 101(Go语言101 中文版) v1.21.amake(chan string, 2) vc := reflect.ValueOf(c) vc.Send(reflect.ValueOf("C")) succeeded := vc.TrySend(reflect.ValueOf("Go")) fmt.Println(succeeded) // true succeeded = vc.TrySend(reflect.ValueOf("C++")) Println(succeeded) // false fmt.Println(vc.Len(), vc.Cap()) // 2 2 vs, succeeded := vc.TryRecv() fmt.Println(vs.String(), succeeded) // C true vs, sentBeforeClosed := vc.Recv() fmt.Println(vs.String() String(), sentBeforeClosed) // Go true vs, succeeded = vc.TryRecv() fmt.Println(vs.String()) // <$1> fmt.Println(succeeded) // false } reflect.Value类型的TrySend和TryRecv方法对应着只有一个case分支和一个 default0 码力 | 608 页 | 1.08 MB | 1 年前3
httpd 2.2.29 中文文档later) should adjust the default environment appropriately. "c:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32" "c:\Program Files\Platform SDK\setenv.bat" Perl and awk Several steps recommended you might use the following build commands: perl Configure no-rc5 no-idea enable-mdc2 enable-zlib VC-WIN32 - Ipath/to/srclib/zlib -Lpath/to/srclib/zlib ms\do_masm.bat nmake -f ms\ntdll.mak It is not provided when invoking the build. Developer Studio Workspace IDE Build Apache can also be compiled using VC++'s Visual Studio development environment. To simplify this process, a Visual Studio workspace, Apache0 码力 | 1854 页 | 1.48 MB | 1 年前3
httpd 2.2.27 中文文档later) should adjust the default environment appropriately. "c:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32" "c:\Program Files\Platform SDK\setenv.bat" Perl and awk Several steps recommended you might use the following build commands: perl Configure no-rc5 no-idea enable-mdc2 enable-zlib VC-WIN32 - Ipath/to/srclib/zlib -Lpath/to/srclib/zlib ms\do_masm.bat nmake -f ms\ntdll.mak It is not provided when invoking the build. Developer Studio Workspace IDE Build Apache can also be compiled using VC++'s Visual Studio development environment. To simplify this process, a Visual Studio workspace, Apache0 码力 | 1849 页 | 1.47 MB | 1 年前3
httpd 2.2.31 中文文档later) should adjust the default environment appropriately. "c:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32" "c:\Program Files\Platform SDK\setenv.bat" Perl and awk Several steps recommended you might use the following build commands: perl Configure no-rc5 no-idea enable-mdc2 enable-zlib VC-WIN32 - Ipath/to/srclib/zlib -Lpath/to/srclib/zlib ms\do_masm.bat nmake -f ms\ntdll.mak It is not provided when invoking the build. Developer Studio Workspace IDE Build Apache can also be compiled using VC++'s Visual Studio development environment. To simplify this process, a Visual Studio workspace, Apache0 码力 | 1860 页 | 1.48 MB | 1 年前3
httpd 2.2.27.dev 中文文档later) should adjust the default environment appropriately. "c:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32" "c:\Program Files\Platform SDK\setenv.bat" Perl and awk Several steps recommended you might use the following build commands: perl Configure no-rc5 no-idea enable-mdc2 enable-zlib VC-WIN32 - Ipath/to/srclib/zlib -Lpath/to/srclib/zlib ms\do_masm.bat nmake -f ms\ntdll.mak It is not provided when invoking the build. Developer Studio Workspace IDE Build Apache can also be compiled using VC++'s Visual Studio development environment. To simplify this process, a Visual Studio workspace, Apache0 码力 | 1849 页 | 1.47 MB | 1 年前3
httpd 2.2.32 中文文档later) should adjust the default environment appropriately. "c:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32" "c:\Program Files\Platform SDK\setenv.bat" Perl and awk Several steps recommended you might use the following build commands: perl Configure no-rc5 no-idea enable-mdc2 enable-zlib VC-WIN32 - Ipath/to/srclib/zlib -Lpath/to/srclib/zlib ms\do_masm.bat nmake -f ms\ntdll.mak It is not provided when invoking the build. Developer Studio Workspace IDE Build Apache can also be compiled using VC++'s Visual Studio development environment. To simplify this process, a Visual Studio workspace, Apache0 码力 | 1866 页 | 1.48 MB | 1 年前3
httpd 2.4.8.dev 中文文档later) should adjust the default environment appropriately. "c:\Program Files\Microsoft Visual Studio\VC98\Bin\VCVARS32" "c:\Program Files\Platform SDK\setenv.bat" Perl and awk Several steps recommended you might use the following build commands: perl Configure no-rc5 no-idea enable-mdc2 enable-zlib VC-WIN32 -Ipath/to/srclib/zlib -Lpath/to/srclib/zlib ms\do_masm.bat nmake -f ms\ntdll.mak It is not provided when invoking the build. Developer Studio Workspace IDE Build Apache can also be compiled using VC++'s Visual Studio development environment. To simplify this process, a Visual Studio workspace, Apache0 码力 | 2404 页 | 1.84 MB | 1 年前3
共 45 条
- 1
- 2
- 3
- 4
- 5













