Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 05/16/20 in all areas

  1. FredS

    Rx10.4 new feature blogs

    I'm also Primary contact and there has never been another, the email hasn't changed from Godzilla, yet nada.. Not that I was interested but some bot shouldn't know that 🙂
  2. pyscripter

    Revisiting TThreadedQueue and TMonitor

    I am attaching a new version of the test code incorporating the suggestions of @Anders Melander in case anyone wants to try see attached iaStressTest.TThreadedQueue.PopItem that can be used with the original stress test of @Darian Miller). iaStressTest.TThreadedQueue.PopItem.pas
  3. Alexander Elagin

    Rx10.4 new feature blogs

    So if I am the Primary Contact (as I paid the bill myself) I still have to assign myself somewhere as an Authorized Contact? Damn, the Embarcadero's sales model does not change with years, they are targeting businesses, not developers. And don't remind me about all this reseller-only distribution and obligatory quote request for updates ☠️...
  4. Dave Nottage

    Rx10.4 new feature blogs

    As Bill said, it's a "we've been given permission" thing. This is not new, however - I think it has been a "thing" for at least a couple of major releases now. Also, you missed my post: https://www.delphiworlds.com/2020/05/its-time-to-get-excited/ 🙂
  5. Anders Melander

    Revisiting TThreadedQueue and TMonitor

    It's been raining so here you go (completely untested): type TEventStack = record Counter: int64; Head: PEventItemHolder; procedure Push(EventItem: PEventItemHolder); function Pop: PEventItemHolder; end; var EventCache: TEventStack; ... EventItemHolders: TEventStack; procedure TEventStack.Push(EventItem: PEventItemHolder); var Current, Next: TEventStack; begin repeat // We don't need to copy atomically since the test below will detect tearing // but since the members should be aligned tearing should not occur anyway. Current := Self; EventItem.Next := Current.Head; Next.Head := EventItem; Next.Counter := Current.Counter + 1; // I'm assuming TInterlocked.CompareExchange returns a boolean: True on success. until TInterlocked.CompareExchange(Self, Next, Current); end; function TEventStack.Pop: PEventItemHolder; var Current, Next: TEventStack; begin repeat Current := Self; if (Current.Head = nil) then Exit(nil); Next.Head := Current.Head.Next; Next.Counter := Current.Counter + 1; until TInterlocked.CompareExchange(Self, Next, Current); Result := Current.Head; end; I've made the two functions members of the record to get rid of the first parameter. What you (or someone else) need to do is provide an implementation of TInterlocked.CompareExchange, AtomicCmpExchange or CAS that handles 16 bytes and returns a boolean indicating success.
  6. I am very happy that FastMM5 is now available and also with the new licensing scheme. We plan to use it in our heavily threaded 64-bit http/socket servers. While I wouldn't have used it at all if it was GPL only, having a commercial offering at a reasonable price is actually more preferable because I like the idea of a properly maintained memory manager for our commercial products. There are plenty of free memory managers around for Delphi, that are barely maintained.
×