Jump to content
JeffBurroughs

Support for Delphi 10.4

Recommended Posts

Installed latest Delphi 10.4.

 

When I try and compile a project that uses otlparralel I get these errors

 

[dcc64 Error] OtlParallel.pas(3884): E2010 Incompatible types: 'TObject' and 'IOmniTaskControl'
[dcc64 Error] OtlParallel.pas(4215): E2250 There is no overloaded version of 'OnStop' that can be called with these arguments
[dcc64 Error] OtlParallel.pas(4234): E2250 There is no overloaded version of 'OnStop' that can be called with these arguments
[dcc64 Error] OtlParallel.pas(4306): E2250 There is no overloaded version of 'CreateTask' that can be called with these arguments
[dcc64 Error] OtlParallel.pas(4600): E2250 There is no overloaded version of 'Execute' that can be called with these arguments
[dcc64 Error] OtlParallel.pas(4622): E2250 There is no overloaded version of 'Task' that can be called with these arguments
[dcc64 Error] OtlParallel.pas(4683): E2250 There is no overloaded version of 'OnStop' that can be called with these arguments
[dcc64 Error] OtlParallel.pas(4945): E2250 There is no overloaded version of 'OnStop' that can be called with these arguments
[dcc64 Error] OtlParallel.pas(5016): E2250 There is no overloaded version of 'OnStop' that can be called with these arguments
[dcc64 Error] OtlParallel.pas(5035): E2250 There is no overloaded version of 'OnStop' that can be called with these arguments
[dcc64 Error] OtlParallel.pas(5282): E2250 There is no overloaded version of 'OnTerminated' that can be called with these arguments
[dcc64 Error] OtlParallel.pas(5342): E2250 There is no overloaded version of 'Initialize' that can be called with these arguments
[dcc64 Error] OtlParallel.pas(5349): E2250 There is no overloaded version of 'OnStop' that can be called with these arguments
[dcc64 Error] OtlParallel.pas(5367): E2250 There is no overloaded version of 'Execute' that can be called with these arguments
[dcc64 Error] OtlParallel.pas(5394): E2250 There is no overloaded version of 'OnStop' that can be called with these arguments
[dcc64 Error] OtlParallel.pas(5416): E2250 There is no overloaded version of 'OnStop' that can be called with these arguments
[dcc64 Error] OtlParallel.pas(5519): E2250 There is no overloaded version of 'Execute' that can be called with these arguments
 

Using latest 3.07.7 omnithreadlibrary download.

 

Is this my issue or a problem that needs patching in otlparallel?

Share this post


Link to post

If you remark out line 3884 it gets it all compiling and running, but I assume with memory leaks.  Although doing some tests with lots of parallel loops does not seem to have any serious leaks?

 

procedure TOmniFuture<T>.Execute(action: TOmniTaskDelegate; taskConfig: IOmniTaskConfig);
begin
  FTask := CreateTask(action, 'TOmniFuture action');
  Parallel.ApplyConfig(taskConfig, FTask);
  FTask.Unobserved;
  if assigned(FTask.CancellationToken) and FTask.CancellationToken.IsSignalled then begin
    FCancelled := true;
    //FreeAndNil(FTask);  //REMARK THIS LINE
  end
  else
    Parallel.Start(FTask, taskConfig);
end; { TOmniFuture<T>.Execute }

 

Share this post


Link to post

OK, great.  Makes an easy fix for otlparallel to support 10.4 then.

Since remarking that line all of the parallel loop tests I have tried run perfectly.

Share this post


Link to post
14 hours ago, JeffBurroughs said:

Using latest 3.07.7 omnithreadlibrary download.

You already fixed the issue, but that issue is already fixed in Omni Thread, too. 

 

There is newer version in the making, not released yet, but it has fixes and packages for 10.4. Last commit was just 4 days ago.

 

https://github.com/gabr42/OmniThreadLibrary

 

When new Delphi release comes out and you find issues with some of the libraries you are using, it is good to recheck library for updates. Keep in mind that libraries cannot be publicly updated before official release and sometimes takes a few days to have those patches and fixes generally available.

  • Thanks 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×