Repository: reef
Updated Branches:
  refs/heads/master bdd0a13fd -> 1e62c9dcc


[REEF-1349] Create ThreadSafe and NotThreadSafe Attributes

JIRA:
  [REEF-1349](https://issues.apache.org/jira/browse/REEF-1349)

Pull Request:
  This closes #962


Project: http://git-wip-us.apache.org/repos/asf/reef/repo
Commit: http://git-wip-us.apache.org/repos/asf/reef/commit/1e62c9dc
Tree: http://git-wip-us.apache.org/repos/asf/reef/tree/1e62c9dc
Diff: http://git-wip-us.apache.org/repos/asf/reef/diff/1e62c9dc

Branch: refs/heads/master
Commit: 1e62c9dcc55a8a20e26f62ce4625d7386107cf66
Parents: bdd0a13
Author: Andrew Chung <[email protected]>
Authored: Thu Apr 21 16:04:54 2016 -0700
Committer: Markus Weimer <[email protected]>
Committed: Fri Apr 22 16:47:15 2016 -0700

----------------------------------------------------------------------
 .../Attributes/NotThreadSafeAttribute.cs        | 30 ++++++++++++++++++++
 .../Attributes/ThreadSafeAttribute.cs           | 30 ++++++++++++++++++++
 .../Org.Apache.Reef.Utilities.csproj            |  2 ++
 3 files changed, 62 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/reef/blob/1e62c9dc/lang/cs/Org.Apache.REEF.Utilities/Attributes/NotThreadSafeAttribute.cs
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.Utilities/Attributes/NotThreadSafeAttribute.cs 
b/lang/cs/Org.Apache.REEF.Utilities/Attributes/NotThreadSafeAttribute.cs
new file mode 100644
index 0000000..5a5fc2d
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Utilities/Attributes/NotThreadSafeAttribute.cs
@@ -0,0 +1,30 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+// 
+//   http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+using System;
+
+namespace Org.Apache.REEF.Utilities.Attributes
+{
+    /// <summary>
+    /// Indicates that the attribute target is not thread safe.
+    /// </summary>
+    [AttributeUsage(AttributeTargets.All)]
+    public sealed class NotThreadSafeAttribute : Attribute
+    {
+         // Intentionally empty.
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/reef/blob/1e62c9dc/lang/cs/Org.Apache.REEF.Utilities/Attributes/ThreadSafeAttribute.cs
----------------------------------------------------------------------
diff --git 
a/lang/cs/Org.Apache.REEF.Utilities/Attributes/ThreadSafeAttribute.cs 
b/lang/cs/Org.Apache.REEF.Utilities/Attributes/ThreadSafeAttribute.cs
new file mode 100644
index 0000000..add39dd
--- /dev/null
+++ b/lang/cs/Org.Apache.REEF.Utilities/Attributes/ThreadSafeAttribute.cs
@@ -0,0 +1,30 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+// 
+//   http://www.apache.org/licenses/LICENSE-2.0
+// 
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+using System;
+
+namespace Org.Apache.REEF.Utilities.Attributes
+{
+    /// <summary>
+    /// Indicates that the attribute target is thread safe.
+    /// </summary>
+    [AttributeUsage(AttributeTargets.All)]
+    public sealed class ThreadSafeAttribute : Attribute
+    {
+        // Intentionally empty. 
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/reef/blob/1e62c9dc/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.Reef.Utilities.csproj
----------------------------------------------------------------------
diff --git a/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.Reef.Utilities.csproj 
b/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.Reef.Utilities.csproj
index 50d5851..0fe5477 100644
--- a/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.Reef.Utilities.csproj
+++ b/lang/cs/Org.Apache.REEF.Utilities/Org.Apache.Reef.Utilities.csproj
@@ -44,9 +44,11 @@ under the License.
     <Compile Include="Attributes\DriverSideAttribute.cs" />
     <Compile Include="Attributes\EvaluatorSideAttribute.cs" />
     <Compile Include="Attributes\InteropAttribute.cs" />
+    <Compile Include="Attributes\NotThreadSafeAttribute.cs" />
     <Compile Include="Attributes\PrivateAttribute.cs" />
     <Compile Include="Attributes\TaskSideAttribute.cs" />
     <Compile Include="Attributes\TestingAttribute.cs" />
+    <Compile Include="Attributes\ThreadSafeAttribute.cs" />
     <Compile Include="Attributes\UnstableAttribute.cs" />
     <Compile Include="AvroUtils.cs" />
     <Compile Include="ByteUtilities.cs" />

Reply via email to