lib_ might get destroyed when there are 2 different graphs using the same FunctionBuf...
authorRohan Jain <rohanj@google.com>
Tue, 6 Mar 2018 19:26:18 +0000 (11:26 -0800)
committerTensorFlower Gardener <gardener@tensorflow.org>
Tue, 6 Mar 2018 19:35:40 +0000 (11:35 -0800)
commit429ce2a60b9faa3db204aed05ab4a9a3a1a6c725
tree0bd809e5f3df5158a835e67c45b0327ef65a4311
parentc6feeafaabb09bdcda3e34009506c5dae596c5d9
lib_ might get destroyed when there are 2 different graphs using the same FunctionBufferingResource. As a result, making a clone of lib_.

Also, fixing the LookupOrCreate call in the handle op to run only once for initialization.

PiperOrigin-RevId: 188052319
tensorflow/contrib/data/kernels/BUILD
tensorflow/contrib/data/kernels/prefetching_kernels.cc
tensorflow/contrib/data/python/ops/prefetching_ops.py
tensorflow/core/BUILD