Skip to content

Commit

Permalink
Flag the functions as CPU bound and to run on a dirty scheduler
Browse files Browse the repository at this point in the history
  • Loading branch information
Vagabond committed Jan 9, 2019
1 parent 1697137 commit 3f02347
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions c_src/erasure.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,10 +591,10 @@ decode_gc(ErlNifEnv * env, int argc, const ERL_NIF_TERM argv[])
}

static ErlNifFunc nif_funcs[] =
{{"encode", 3, encode, 0},
{"encode_gc", 4, encode_gc, 0},
{"decode", 3, decode, 0},
{"decode_gc", 4, decode_gc, 0}};
{{"encode", 3, encode, ERL_NIF_DIRTY_JOB_CPU_BOUND},
{"encode_gc", 4, encode_gc, ERL_NIF_DIRTY_JOB_CPU_BOUND},
{"decode", 3, decode, ERL_NIF_DIRTY_JOB_CPU_BOUND},
{"decode_gc", 4, decode_gc, ERL_NIF_DIRTY_JOB_CPU_BOUND}};

#define ATOM(Id, Value) \
{ \
Expand Down

0 comments on commit 3f02347

Please sign in to comment.