1 /* Copyright 2015 The TensorFlow Authors. All Rights Reserved. 2 3 Licensed under the Apache License, Version 2.0 (the "License"); 4 you may not use this file except in compliance with the License. 5 You may obtain a copy of the License at 6 7 http://www.apache.org/licenses/LICENSE-2.0 8 9 Unless required by applicable law or agreed to in writing, software 10 distributed under the License is distributed on an "AS IS" BASIS, 11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 See the License for the specific language governing permissions and 13 limitations under the License. 14 ==============================================================================*/ 15 16 %nothread tensorflow::io::PyRecordWriter::WriteRecord; 17 18 %include "tensorflow/python/platform/base.i" 19 %include "tensorflow/python/lib/core/strings.i" 20 21 %feature("except") tensorflow::io::PyRecordWriter::New { 22 // Let other threads run while we write 23 Py_BEGIN_ALLOW_THREADS 24 $action 25 Py_END_ALLOW_THREADS 26 } 27 28 %newobject tensorflow::io::PyRecordWriter::New; 29 30 %feature("except") tensorflow::io::PyRecordWriter::WriteRecord { 31 // Let other threads run while we write 32 Py_BEGIN_ALLOW_THREADS 33 $action 34 Py_END_ALLOW_THREADS 35 } 36 37 %{ 38 #include "tensorflow/python/lib/io/py_record_writer.h" 39 %} 40 41 %ignoreall 42 43 %unignore tensorflow; 44 %unignore tensorflow::io; 45 %unignore tensorflow::io::PyRecordWriter; 46 %unignore tensorflow::io::PyRecordWriter::~PyRecordWriter; 47 %unignore tensorflow::io::PyRecordWriter::WriteRecord; 48 %unignore tensorflow::io::PyRecordWriter::Flush; 49 %unignore tensorflow::io::PyRecordWriter::Close; 50 %unignore tensorflow::io::PyRecordWriter::New; 51 52 %include "tensorflow/python/lib/io/py_record_writer.h" 53 54 %unignoreall 55