mirror of
https://github.com/AdaCore/PolyORB.git
synced 2026-02-12 13:01:15 -08:00
asynchronous RPC, RAS and RACW. Subversion-branch: /importfromcvs/trunk Subversion-revision: 46751
25 lines
455 B
Ada
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;
|