// SPDX-License-Identifier: MIT // Copyright (c) 2026 Incoprea // Share work budgets across queues // Not compiled or tested in-world // Setup: Place in a spare owned prim. Edit two job-cost queues and their quantum budget. Owner touch runs the local demonstration. // Stop / restore: Disable/remove. No external requests or scene changes occur; reset clears memory. // Notes: Runs four bounded scheduling rounds. Costs and quanta must be positive; no actual work besides owner messages is performed. // License: see LICENSE in this distribution. // Original Incoprea. MIT. Local owner-only protocol laboratory. list QUEUE_A=[3,3,3]; list QUEUE_B=[5,2,5]; integer QUANTUM_A=3; integer QUANTUM_B=3; default { touch_start(integer detectedCount) { if(llDetectedKey(0)!=llGetOwner())return; integer a; integer b; integer budgetA; integer budgetB; integer round; for(round=0;round<4;++round) { budgetA+=QUANTUM_A; budgetB+=QUANTUM_B; while(a