Github user dgkimura commented on a diff in the pull request:

    https://github.com/apache/geode-native/pull/36#discussion_r103252510
  
    --- Diff: src/cppcache/integration-test/testSpinLock.cpp ---
    @@ -20,48 +20,44 @@
     #include "fw_dunit.hpp"
     #include <geode/GeodeCppCache.hpp>
     
    +#include <mutex>
    +#include <util/concurrent/spinlock_mutex.hpp>
    +
     #include <Condition.hpp>
     
     #include <ace/Task.h>
     #include <ace/Time_Value.h>
     #include <ace/Guard_T.h>
     
    -namespace apache {
    -namespace geode {
    -namespace client {
    +namespace {
     
    -CPPCACHE_EXPORT void* testSpinLockCreate();
    -CPPCACHE_EXPORT void testSpinLockAcquire(void* lock);
    -CPPCACHE_EXPORT void testSpinLockRelease(void* lock);
    -}  // namespace client
    -}  // namespace geode
    -}  // namespace apache
    +using apache::geode::util::concurrent::spinlock_mutex;
     
     DUNIT_TASK(s1p1, Basic)
       {
    -    void* lock = apache::geode::client::testSpinLockCreate();
    -    apache::geode::client::testSpinLockAcquire(lock);
    -    apache::geode::client::testSpinLockRelease(lock);
    +    spinlock_mutex s;
    +    { std::lock_guard<spinlock_mutex> lk(s); }
    --- End diff --
    
    I actually find using separate lines more readable.  How does everybody 
else feel?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to