-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* #658 : creating dpa * [FIXED] "__typeof self" expression inside the nested class / closure * [REDUX] iterator method * #496 : adding support the private fields
- Loading branch information
Showing
67 changed files
with
1,386 additions
and
583 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
6.2.2 | ||
6.3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Package: elena-lang | ||
Version: 6.2.3 | ||
Version: 6.3.0 | ||
Architecture: aarch64 | ||
Maintainer: Alex Rakov <[email protected]> | ||
Depends: libc6 (>= 2.1) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Package: elena-lang | ||
Version: 6.2.3 | ||
Version: 6.3.0 | ||
Architecture: amd64 | ||
Maintainer: Alex Rakov <[email protected]> | ||
Depends: libc6 (>= 2.1) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Package: elena-lang | ||
Version: 6.2.3 | ||
Version: 6.3.0 | ||
Architecture: i386 | ||
Maintainer: Alex Rakov <[email protected]> | ||
Depends: libc6 (>= 2.1) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Package: elena-lang | ||
Version: 6.2.3 | ||
Version: 6.3.0 | ||
Architecture: ppc64le | ||
Maintainer: Alex Rakov <[email protected]> | ||
Depends: libc6 (>= 2.1) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
//--------------------------------------------------------------------------- | ||
// E L E N A P r o j e c t: ELENA Debugger Adapater | ||
// | ||
// This file contains the DPA queue declarations | ||
// | ||
// (C)2024, by Aleksey Rakov | ||
//--------------------------------------------------------------------------- | ||
|
||
#ifndef DPA_QUEUE_H | ||
#define DPA_QUEUE_H | ||
|
||
#include <queue> | ||
#include <condition_variable> | ||
#include <mutex> | ||
#include <optional> | ||
|
||
namespace dpa | ||
{ | ||
// --- ContentReader --- | ||
template <typename T> | ||
class ThreadQueue | ||
{ | ||
bool _closed = false; | ||
std::queue<T> _queue; | ||
std::condition_variable _cv; | ||
std::mutex _mutex; | ||
|
||
public: | ||
void close(); | ||
|
||
void put(const T& in); | ||
std::optional<T> take(); | ||
}; | ||
|
||
template <typename T> | ||
void ThreadQueue<T> :: close() | ||
{ | ||
std::unique_lock<std::mutex> lock(_mutex); | ||
_closed = true; | ||
_cv.notify_all(); | ||
} | ||
|
||
template <typename T> | ||
void ThreadQueue<T> :: put(const T& in) | ||
{ | ||
std::unique_lock<std::mutex> lock(_mutex); | ||
auto notify = _queue.size() == 0 && !_closed; | ||
_queue.push(in); | ||
if (notify) | ||
_cv.notify_all(); | ||
} | ||
|
||
template <typename T> | ||
std::optional<T> ThreadQueue<T> :: take() | ||
{ | ||
std::unique_lock<std::mutex> lock(_mutex); | ||
_cv.wait(lock, [&] { return _queue.size() > 0 || _closed; }); | ||
if (_queue.size() == 0) { | ||
return std::optional<T>(); | ||
} | ||
auto out = std::move(_queue.front()); | ||
_queue.pop(); | ||
return std::optional<T>(std::move(out)); | ||
} | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.