Skip to content

using Pony to parallelize a single threaded C program (Lua)

License

Notifications You must be signed in to change notification settings

d-led/pony_lua_parallel

Repository files navigation

pony_lua_parallel

using Pony to parallelize a single threaded C program (Lua)

Build Status Build status

Building and Running

Docker

docker-compose build --build-arg MAX_NUM=40

re-run:

docker-compose run -e MAX_NUM=40 pony

Pony

  • Install Pony
  • ponyc
  • run pony_lua_parallel

CI

  • Travis-CI runs on 1 virtual core, thus parallelism effects cannot be observed there.
Can't have --ponymaxthreads > physical cores, the number of threads you'd be running with (2 > 1)
  • Appveyor seems to run on more than 1 core, and thus some parallelism can be observed

Contents

See main.pony:

  • synchronous_demo: calling Lua synchronously from Pony via FFI
  • asynchronous_demo: creating an actor owning a Lua instance upon each request, and waiting for asynchronously arriving results via Promises
  • lua_sending_messages_demo: creating a fixed number of worker actors in Pony, and dispatching work to them from Lua
  • lua.pony: the problem-specific FFI based Lua 5.3 wrapper class

About

using Pony to parallelize a single threaded C program (Lua)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published