Skip to content

Conversation

@bnoordhuis
Copy link
Member

For synchronous file operation requests (ones without a callback), there
is no need to make a copy of the arguments because they don't outlive
the scope of the function call.

R=@saghul

CI: https://jenkins-iojs.nodesource.com/view/libuv/job/libuv+any-pr+multi/128/

@saghul
Copy link
Member

saghul commented Aug 17, 2015

LGTM

@saghul
Copy link
Member

saghul commented Aug 17, 2015

Note to self / you (if you feel like): #469 when doing sync reqs we shouldn't need the loop at all. (we currently add the req to a queue)

@bnoordhuis bnoordhuis force-pushed the optimize-sync-fs-reqs branch from 3ba0a18 to 4e57137 Compare August 17, 2015 18:01
@bnoordhuis
Copy link
Member Author

Added a commit that does just that, PTAL. I can split it up in two PRs if you think it's too big.

CI: https://jenkins-iojs.nodesource.com/view/libuv/job/libuv+any-pr+multi/131/

@saghul
Copy link
Member

saghul commented Aug 17, 2015

LGTM! 👍

@saghul
Copy link
Member

saghul commented Aug 18, 2015

@bnoordhuis I plan to make a patch release tonight or tomorrow night, do you want to land this?

The parentheses are unnecessary because what they wrap are not macro
arguments but function arguments that aren't evaluated by the macro.

PR-URL: libuv#479
Reviewed-By: Saúl Ibarra Corretgé <[email protected]>
For synchronous file operation requests (ones without a callback), there
is no need to make a copy of the arguments because they don't outlive
the scope of the function call.

PR-URL: libuv#479
Reviewed-By: Saúl Ibarra Corretgé <[email protected]>
Join the watchdog thread unconditionally on exit.  Fixes the following
harmless but noisy memory leak:

    576 bytes in 1 blocks are possibly lost in loss record 1 of 2
       at 0x4C2A9C7: calloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
       by 0x40121B4: _dl_allocate_tls (in /usr/lib64/ld-2.21.so)
       by 0x5AEA045: pthread_create@@GLIBC_2.2.5 (in /usr/lib64/libpthread-2.21.so)
       by 0x450D3E: process_wait (runner-unix.c:212)
       by 0x4067F1: run_test (runner.c:284)
       by 0x405EC3: maybe_run_test (run-tests.c:180)
       by 0x4058AD: main (run-tests.c:57)

PR-URL: libuv#479
Reviewed-By: Saúl Ibarra Corretgé <[email protected]>
Synchronous file operations don't need an event loop.  Permit NULL as
the event loop parameter.

Fixes: libuv#469
PR-URL: libuv#479
Reviewed-By: Saúl Ibarra Corretgé <[email protected]>
@bnoordhuis bnoordhuis force-pushed the optimize-sync-fs-reqs branch from 4e57137 to df62b54 Compare August 18, 2015 13:40
@bnoordhuis bnoordhuis merged commit df62b54 into libuv:v1.x Aug 18, 2015
@bnoordhuis bnoordhuis deleted the optimize-sync-fs-reqs branch August 18, 2015 13:40
@bnoordhuis
Copy link
Member Author

Landed in 64f5c93...df62b54.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants