Implements: #7788 Add callback to mem_guard for background workers
