On-the-fly adaptivity for process networks over shared-memory platforms