Files
PolyORB/Examples/Callbacks/local.adb
Laurent Pautet b2bf6d3876 Some kind of distributed scheduler based on remote callbacks using
asynchronous RPC, RAS and RACW.

Subversion-branch: /importfromcvs/trunk
Subversion-revision: 46751
1998-04-15 16:46:04 +00:00

25 lines
455 B
Ada

with Scheduler; use Scheduler;
package body Local is
Me : aliased New_Worker;
ID : constant Natural := Local'Partition_ID;
procedure Initialize is
begin
Push (Me'Access);
end Initialize;
procedure Work
(W : access New_Worker;
Q : in Query;
C : in Callback) is
R : Reply;
begin
delay Duration (Q);
R := Reply (Q * Q);
C.all (Q, R, ID);
Push (Me'Access);
end Work;
end Local;