Skip to content

Instantly share code, notes, and snippets.

@muraiki
Created September 16, 2015 18:48
Show Gist options
  • Save muraiki/24c7dac46733b58abcfb to your computer and use it in GitHub Desktop.
Save muraiki/24c7dac46733b58abcfb to your computer and use it in GitHub Desktop.
This uses a huge amount of CPU even with no events...
# This uses a huge amount of CPU (it gets auto-killed by the OS after hitting 180% or so)
# even with no filesystem events occurring...
IO::Notification.watch-path('.')\
.map(*.path)\
.grep(* ~~ /hhvm_.*\.sock/)\
.map(*.IO)\
.grep({ .e })\
.unique(:expires(1))\
.tap(-> $foo {
say "$foo.perl() - $foo.e()";
});
sleep(1000);
@muraiki
Copy link
Author

muraiki commented Sep 16, 2015

If I remove the .unique line, it works without a problem.

@zhuomingliang
Copy link

Hello, muraiki, pleasee feel free file a bug to RT, thanks.

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