Hello,
More of my philosophy about my new updated implementation of a future and about the ActiveObject and about technology and more of my thoughts..
I am a white arab, and i think i am smart since i have also
invented many scalable algorithms and algorithms..
I think i am highly smart since I have passed two certified IQ tests and i have scored "above" 115 IQ, so i have just updated my implementation
of a future, and now both the starting the thread of the future and the passing the parameter as a pointer to the future is made from the constructor so that to make safe the system of the automaton of the how to use and call the methods, and I have just
added support for exceptions, so you have to know that programming with futures is asynchronous programming, but so that to be robust the future implementation has to deal correctly with "exceptions", so in my implementation of a future when an exception
is raised inside the future you will receive the exception, so i have implemented two things: The HasException() method so that to detect the exception from inside the future, and the the exception and its address is returned as a string in the
ExceptionStr property, and my implementation of a future does of course support passing parameters as a pointer to the future, also my implementation of a future works in Windows and Linux, and of course you can also use my following Threadpool engine
with priorities as a sophisticated ActiveObject or such and pass the methods or functions and there parameters to it, here it is:
Threadpool engine with priorities
https://sites.google.com/site/scalable68/threadpool-engine-with-priorities
And stay tuned since i will enhance more my above Threadpool engine with priorities.
So you can download my new updated portable and efficient implementation of a future in Delphi and FreePascal version 1.32 from my website here:
https://sites.google.com/site/scalable68/a-portable-and-efficient-implementation-of-a-future-in-delphi-and-freepascal
And here is a new example program of how to use my implementation of a future in Delphi and Freepascal and notice that the interface has changed a little bit:
--
program TestFuture;
uses system.SysUtils, system.Classes, Futures;
type
TTestFuture1 = class(TFuture)
public
function Compute(ptr:pointer): Variant; override;
end;
TTestFuture2 = class(TFuture)
public
function Compute(ptr:pointer): Variant; override;
end;
var obj1:TTestFuture1;
obj2:TTestFuture2;
a:variant;
function TTestFuture1.Compute(ptr:pointer): Variant;
begin
raise Exception.Create('I raised an exception');
end;
function TTestFuture2.Compute(ptr:pointer): Variant;
begin
writeln(nativeint(ptr));
result:='Hello world !';
end;
begin
writeln;
obj1:=TTestFuture1.create(pointer(12));
if obj1.GetValue(a) then writeln(a)
else if obj1.HasException then writeln(obj1.ExceptionStr);
obj1.free;
writeln;
obj2:=TTestFuture2.create(pointer(12));
if obj2.GetValue(a) then writeln(a);
obj2.free;
end.
---
More of my philosophy about quantum computing and about matrix operations and about scalability and more of my thoughts..
I think i am highly smart since I have passed two certified IQ tests and i have scored "above" 115 IQ, i have just looked at the following
video about the powerful parallel quantum computer of IBM from USA that will be soon available in the cloud, and i invite you to look at it:
Quantum Computing: Now Widely Available!
https://www.youtube.com/watch?v=laqpfQ8-jFI
But i have just read the following paper and it is saying that the powerful Quantum algorithms for matrix operations and linear systems of equations are available, read about them on the below paper, so as you notice in the following paper that many
matrix operations and also the linear systems of equations solver can be done in a quantum computer, read about it here in the following paper:
Quantum algorithms for matrix operations and linear systems of equations
Read more here:
https://arxiv.