objeck / objeck-lang

Objeck is a modern object-oriented programming language with functional features tailored for machine learning. It emphasizes expression, simplicity, portability, and scalability. The programming environment consists of a compiler, virtual machine, REPL shell, and command line debugger with IDE plugins.
https://objeck.org
Other
154 stars 11 forks source link

Garbage Collector Deadlock #482

Closed objeck closed 5 months ago

objeck commented 6 months ago

The following code caused a deadlock in the GC.

input := args[0];

output := HttpsClient->New()->QuickGet(Web.HTTP.Url->New(input))->GetContent()->ToString();
output_len := output->Size();
"URL: {$input}, read: {$output_len} character(s)"->PrintLine();

"running regex..."->PrintLine();        
expr := "(href|HREF|src|SRC)=(\"|')(http://|https://|/)?((\\w|\\d|-|_)+(\\.|/)?)+(\\?(\\w|\\d|-|_)+=(\\w|\\d|-|_)+)?(&(\\w|\\d|-|_)+=(\\w|\\d|-|_)+)?(\"|')";

found := RegEx->New(expr)->Find(output)<Result>;
"---"->PrintLine();
each(i : found) {
    found->Get(i)->ToString()->PrintLine();
};
objeck commented 6 months ago
Allocation_2024-03-17_0