<div dir="ltr">On Feb 18, Lorenz wrote:<div><br></div><div>> <span style="color:rgb(0,0,0)">As I was building some FFI code for libcurl...</span></div><div><br></div><div>We have developed a libcurl package for Cuis Smalltalk implemented entirely via FFI.</div><div>
<p>The package provides support for the easy, multi, and share APIs, including callback handling. We have also written a set of tests and usage examples to exercise the functionality and validate the bindings.</p>
<p>The package is not yet published, but we are in the process of preparing it for release. </p><p>> <span style="color:rgb(0,0,0)">Has anyone succeeded with the non-blocking FFI in Cuis yet...</span></p><p>Yes, we have been using Cuis on the threaded-FFI OpenSmalltalk VM on Windows, macOS, and Linux.</p><p>I am attaching a package containing test cases that exercise ODBC FFI calls and illustrate the different behavior between the standard VM and the threaded-FFI VM.</p><p>Please take a look at the <code>VmTest</code> class.</p><p>In particular, you will see that we included a method that animates a morph by changing its colors. This allows us to visually verify that the main UI thread is not blocked while the FFI call is running.</p><p class="gmail-p1" style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-variant-alternates:normal;font-size-adjust:none;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-size:13px;line-height:normal">
</p><p>The <code>NonThreadedFFIvmTest</code> and <code>ThreadedFFIvmTest</code> classes provide automated test variants for both VM configurations. Each test is designed to succeed in one VM flavor and fail (or block) in the other, making the behavioral differences explicit.</p><p>Felipe</p><p><span style="color:rgb(0,0,0)"><br></span></p><p><span style="color:rgb(0,0,0)"><br></span></p><p><br></p><p><br></p></div></div>