- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 216 for __callback (0.38 sec)
-
src/runtime/testdata/testprogcgo/callback.go
import ( "fmt" "os" "runtime" "sync/atomic" _ "unsafe" // for go:linkname ) func init() { register("CgoCallbackGC", CgoCallbackGC) } //export go_callback func go_callback() { if e := extraMInUse.Load(); e == 0 { fmt.Printf("in callback extraMInUse got %d want >0\n", e) os.Exit(1) } runtime.GC() grow() runtime.GC() } var cnt int func grow() { x := 10000 sum := 0
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 01 14:05:01 UTC 2023 - 1.9K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Callback.kt
e: IOException, ) /** * Called when the HTTP response was successfully returned by the remote server. The callback may * proceed to read the response body with [Response.body]. The response is still live until its * response body is [closed][ResponseBody]. The recipient of the callback may consume the response * body on another thread. *
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.6K bytes - Viewed (0) -
src/internal/trace/testdata/testprog/cgo-callback.go
// license that can be found in the LICENSE file. // Tests CPU profiling. //go:build ignore package main /* #include <pthread.h> void go_callback(); void go_callback2(); static void *thr(void *arg) { go_callback(); return 0; } static void foo() { pthread_t th; pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setstacksize(&attr, 256 << 10);
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 1.3K bytes - Viewed (0) -
src/cmd/cgo/internal/swig/testdata/callback/main.go
} func testCall() { c := NewCaller() cb := NewCallback() c.SetCallback(cb) s := c.Call() if s != "Callback::run" { fatal("unexpected string from Call: %q", s) } c.DelCallback() } func testCallback() { c := NewCaller() cb := NewDirectorCallback(&GoCallback{}) c.SetCallback(cb) s := c.Call() if s != "GoCallback.Run" { fatal("unexpected string from Call with callback: %q", s)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 12:00:07 UTC 2023 - 1K bytes - Viewed (0) -
src/runtime/testdata/testprogcgo/cgonocallback.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package main // #cgo nocallback annotations for a C function means it should not callback to Go. // But it do callback to go in this test, Go should crash here. /* // TODO(#56378): #cgo nocallback runCShouldNotCallback extern void runCShouldNotCallback(); */ import "C" import ( "fmt" ) func init() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Nov 02 16:43:23 UTC 2023 - 629 bytes - Viewed (0) -
src/cmd/cgo/internal/test/callback_c.c
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. #include <string.h> #include "_cgo_export.h" void callback(void *f) { // use some stack space volatile char data[64*1024]; data[0] = 0; goCallback(f); data[sizeof(data)-1] = 0; } void callGoFoo(void) { extern void goFoo(void); goFoo(); } void IntoC(void) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 12 12:00:02 UTC 2023 - 933 bytes - Viewed (0) -
src/runtime/race/output_test.go
typedef struct cb { int foo; } cb; extern void goCallback(); static inline void *threadFunc(void *p) { goCallback(); return 0; } static inline void startThread(cb* c) { pthread_t th; pthread_create(&th, 0, threadFunc, 0); } */ import "C" var done chan bool var racy int //export goCallback func goCallback() { racy++ done <- true } func main() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Oct 25 20:44:25 UTC 2023 - 9.3K bytes - Viewed (0) -
android/guava-testlib/test/com/google/common/testing/TearDownStackTest.java
boolean ran = false; @Nullable Callback callback = null; public SimpleTearDown() {} public SimpleTearDown(Callback callback) { this.callback = callback; } @Override public void tearDown() throws Exception { if (callback != null) { callback.run(); } ran = true; } }
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Mon Apr 17 15:19:38 UTC 2023 - 4.6K bytes - Viewed (0) -
src/runtime/wincallback.go
// to the callback index. Callbackasm is a table of MOV and B instructions. // The MOV instruction loads R12 with the callback index, and the // B instruction branches to callbackasm1. // callbackasm1 takes the callback index from R12 and // indexes into an array that stores information about each callback. // It then calls the Go implementation for that callback. #include "textflag.h"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jan 24 19:29:51 UTC 2023 - 3.5K bytes - Viewed (0) -
callbacks.go
} } return nil } func (p *processor) Before(name string) *callback { return &callback{before: name, processor: p} } func (p *processor) After(name string) *callback { return &callback{after: name, processor: p} } func (p *processor) Match(fc func(*DB) bool) *callback { return &callback{match: fc, processor: p} } func (p *processor) Register(name string, fn func(*DB)) error {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Tue Mar 26 03:33:36 UTC 2024 - 8.6K bytes - Viewed (0)