MCPcopy Create free account
hub / github.com/apple/foundationdb / write_impl

Method write_impl

fdbrpc/include/fdbrpc/AsyncFileEIO.actor.h:361–376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

359 }
360
361 ACTOR static Future<Void> write_impl(int fd, Reference<ErrorInfo> err, StringRef data, int64_t offset) {
362 state TaskPriority taskID = g_network->getCurrentTask();
363 state Promise<Void> p;
364 state eio_req* r = eio_write(fd, (void*)data.begin(), data.size(), offset, 0, eio_callback, &p);
365 try {
366 wait(p.getFuture());
367 } catch (...) {
368 g_network->setCurrentTask(taskID);
369 eio_cancel(r);
370 throw;
371 }
372 if (r->result != data.size())
373 error("WriteError", fd, r, err);
374 wait(delay(0, taskID));
375 return Void();
376 }
377
378 ACTOR static Future<Void> truncate_impl(int fd, Reference<ErrorInfo> err, int64_t size) {
379 state TaskPriority taskID = g_network->getCurrentTask();

Callers

nothing calls this directly

Calls 10

eio_writeFunction · 0.85
eio_cancelFunction · 0.85
delayFunction · 0.85
errorFunction · 0.50
VoidClass · 0.50
getCurrentTaskMethod · 0.45
beginMethod · 0.45
sizeMethod · 0.45
getFutureMethod · 0.45
setCurrentTaskMethod · 0.45

Tested by

no test coverage detected